Ejemplo n.º 1
0
 protected function loadTrackerPlugins(Request $request)
 {
     // Adding &dp=1 will disable the provider plugin, if token_auth is used (used to speed up bulk imports)
     $disableProvider = $request->getParam('dp');
     if (!empty($disableProvider)) {
         Tracker::setPluginsNotToLoad(array('Provider'));
     }
     try {
         $pluginsTracker = \Piwik\Plugin\Manager::getInstance()->loadTrackerPlugins();
         Common::printDebug("Loading plugins: { " . implode(", ", $pluginsTracker) . " }");
     } catch (Exception $e) {
         Common::printDebug("ERROR: " . $e->getMessage());
     }
 }
Ejemplo n.º 2
0
 protected function loadTrackerPlugins(Request $request)
 {
     // Adding &dp=1 will disable the provider plugin, if token_auth is used (used to speed up bulk imports)
     $disableProvider = $request->getParam('dp');
     if (!empty($disableProvider) && $request->isAuthenticated()) {
         Tracker::setPluginsNotToLoad(array('Provider'));
     }
     try {
         $pluginsTracker = Config::getInstance()->Plugins_Tracker['Plugins_Tracker'];
         if (count($pluginsTracker) > 0) {
             $pluginsTracker = array_diff($pluginsTracker, self::getPluginsNotToLoad());
             \Piwik\Plugin\Manager::getInstance()->doNotLoadAlwaysActivatedPlugins();
             \Piwik\Plugin\Manager::getInstance()->loadPlugins($pluginsTracker);
             Common::printDebug("Loading plugins: { " . implode(",", $pluginsTracker) . " }");
         }
     } catch (Exception $e) {
         Common::printDebug("ERROR: " . $e->getMessage());
     }
 }