diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php index cf9a9888befc73001bda513ca767527160cc5e9a..f17abe7141956d9251561c125565429c0ff5f155 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; diff --git a/lang/en.json b/lang/en.json index 01c5ed18f1b4ba300f1a618157dca0823aeb4902..8a3b9df0fc61b0637994c10a741e8d927d3770fa 100644 --- a/lang/en.json +++ b/lang/en.json @@ -388,7 +388,7 @@ "WarningFileIntegrityNoManifestDeployingFromGit": "If you are deploying Piwik from Git, this message is normal.", "WarningFileIntegrityNoMd5file": "File integrity check could not be completed due to missing md5_file() function.", "WarningPasswordStored": "%sWarning:%s This password will be stored in the config file visible to everybody who can access it.", - "WarningDebugOnDemandEnabled": "Debugging Tracker on demand is enabled. For security reasons this should be enabled only for a short time frame. To disable it set %s to %s in %s", + "WarningDebugOnDemandEnabled": "Tracker %s mode is enabled. For security reasons this should be enabled only for a short time frame. To disable it set %s to %s in %s", "Website": "Website", "Weekly": "Weekly", "WeeklyReport": "weekly",