Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CustomPiwikJs/CustomPiwikJs.php')
-rw-r--r--plugins/CustomPiwikJs/CustomPiwikJs.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/CustomPiwikJs/CustomPiwikJs.php b/plugins/CustomPiwikJs/CustomPiwikJs.php
index 0230ce4d56..b4028c8120 100644
--- a/plugins/CustomPiwikJs/CustomPiwikJs.php
+++ b/plugins/CustomPiwikJs/CustomPiwikJs.php
@@ -8,6 +8,7 @@
namespace Piwik\Plugins\CustomPiwikJs;
+use Piwik\Container\StaticContainer;
use Piwik\Log;
use Piwik\Plugin;
@@ -30,8 +31,10 @@ class CustomPiwikJs extends Plugin
public function updateTracker()
{
try {
- $trackerUpdater = new TrackerUpdater();
- $trackerUpdater->update();
+ if (Plugin\Manager::getInstance()->isPluginActivated('CustomPiwikJs')) {
+ $trackerUpdater = StaticContainer::get('Piwik\Plugins\CustomPiwikJs\TrackerUpdater');
+ $trackerUpdater->update();
+ }
} catch (\Exception $e) {
Log::error('There was an error while updating the javascript tracker: ' . $e->getMessage());
}