mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
Fixed piwik-analytics plugin
This commit is contained in:
parent
139f412b6a
commit
11b66abd17
2 changed files with 38 additions and 37 deletions
|
@ -7,7 +7,8 @@ class PiwikAnalyticsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
*/
|
||||
public function Init()
|
||||
{
|
||||
if ('' !== $this->Config()->Get('plugin', 'account', ''))
|
||||
if ('' !== $this->Config()->Get('plugin', 'piwik_url', '') &&
|
||||
'' !== $this->Config()->Get('plugin', 'site_id', ''))
|
||||
{
|
||||
$this->addJs('js/include.js');
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ $(function () {
|
|||
if ('' !== sPiwikURL && '' !== sSiteID)
|
||||
{
|
||||
sPiwikURL = sPiwikURL.replace(/[\\\/\s]+$/, '') + '/';
|
||||
if (/^https?:/i.test(sPiwikURL))
|
||||
if (!/^https?:/i.test(sPiwikURL))
|
||||
{
|
||||
sPiwikURL = 'http://' + sPiwikURL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue