diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-09-04 11:43:20 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-09-04 11:43:20 +0300 |
commit | a38c3e0d3e8dc0220c00d2c4ec89acede58885a0 (patch) | |
tree | f8684b9b78550592d7d03a23aa3d15bd9d266579 /core/Plugin/ControllerAdmin.php | |
parent | ba7ca7767de55da3f3a089373ec611455731a9e5 (diff) |
also show warning if tracker debug is enabled
Diffstat (limited to 'core/Plugin/ControllerAdmin.php')
-rw-r--r-- | core/Plugin/ControllerAdmin.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php index cf9a9888be..f17abe7141 100644 --- a/core/Plugin/ControllerAdmin.php +++ b/core/Plugin/ControllerAdmin.php @@ -142,21 +142,22 @@ abstract class ControllerAdmin extends Controller NotificationManager::notify('PHP53VersionCheck', $notification); } - private static function notifyWhenDebugOnDemandIsEnabled() + private static function notifyWhenDebugOnDemandIsEnabled($trackerSetting) { if (!Development::isEnabled() && Piwik::hasUserSuperUserAccess() && - TrackerConfig::getConfigValue('debug_on_demand')) { + TrackerConfig::getConfigValue($trackerSetting)) { $message = Piwik::translate('General_WarningDebugOnDemandEnabled'); - $message = sprintf($message, '"[Tracker]debug_on_demand"', '"0"', '"config/config.ini.php"'); + $message = sprintf($message, '"' . $trackerSetting . '"', '"[Tracker]' . $trackerSetting . '"', '"0"', + '"config/config.ini.php"'); $notification = new Notification($message); $notification->title = Piwik::translate('General_Warning'); $notification->priority = Notification::PRIORITY_LOW; $notification->context = Notification::CONTEXT_WARNING; $notification->type = Notification::TYPE_TRANSIENT; $notification->flags = Notification::FLAG_NO_CLEAR; - NotificationManager::notify('DebugOnDemand', $notification); + NotificationManager::notify('Tracker' . $trackerSetting, $notification); } } @@ -205,7 +206,8 @@ abstract class ControllerAdmin extends Controller self::checkPhpVersion($view); self::notifyWhenPhpVersionIsEOL(); - self::notifyWhenDebugOnDemandIsEnabled(); + self::notifyWhenDebugOnDemandIsEnabled('debug'); + self::notifyWhenDebugOnDemandIsEnabled('debug_on_demand'); $adminMenu = MenuAdmin::getInstance()->getMenu(); $view->adminMenu = $adminMenu; |