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:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-23 17:55:48 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-23 17:55:48 +0400
commit864f13a18bb51917f0b063b4fb64449461da9ab0 (patch)
treeff03b4d57afbe796afdc7582dac8952e64b35d8e /core/Plugin/ControllerAdmin.php
parentd7315b116a83dca10e98331ffdeda38af5d7eb7b (diff)
refs #6056 display a warning in admin to super users in case they are still using PHP 5.3
Diffstat (limited to 'core/Plugin/ControllerAdmin.php')
-rw-r--r--core/Plugin/ControllerAdmin.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php
index e37cd7b11b..b18fe67de6 100644
--- a/core/Plugin/ControllerAdmin.php
+++ b/core/Plugin/ControllerAdmin.php
@@ -65,7 +65,7 @@ abstract class ControllerAdmin extends Controller
$notification = new Notification($invalidPluginsWarning);
$notification->raw = true;
$notification->context = Notification::CONTEXT_WARNING;
- $notification->title = Piwik::translate('General_Warning') . ':';
+ $notification->title = Piwik::translate('General_Warning');
Notification\Manager::notify('ControllerAdmin_InvalidPluginsWarning', $notification);
}
@@ -178,6 +178,16 @@ abstract class ControllerAdmin extends Controller
self::checkPhpVersion($view);
+ if (Piwik::hasUserSuperUserAccess() && self::isPhpVersion53()) {
+ $notification = new Notification(Piwik::translate('General_WarningPhpVersionXIsTooOld', '5.3'));
+ $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('PHP53VersionCheck', $notification);
+ }
+
$adminMenu = MenuAdmin::getInstance()->getMenu();
$view->adminMenu = $adminMenu;
@@ -207,4 +217,10 @@ abstract class ControllerAdmin extends Controller
$view->phpVersion = PHP_VERSION;
$view->phpIsNewEnough = version_compare($view->phpVersion, '5.3.0', '>=');
}
+
+ private static function isPhpVersion53()
+ {
+ return strpos(PHP_VERSION, '5.3') === 0;
+ }
+
}