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:
-rw-r--r--core/Plugin/ControllerAdmin.php23
-rw-r--r--lang/en.json2
-rw-r--r--plugins/CoreAdminHome/stylesheets/generalSettings.less2
3 files changed, 21 insertions, 6 deletions
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php
index 42f44706b1..6ecca10243 100644
--- a/core/Plugin/ControllerAdmin.php
+++ b/core/Plugin/ControllerAdmin.php
@@ -124,13 +124,23 @@ abstract class ControllerAdmin extends Controller
private static function notifyWhenPhpVersionIsEOL()
{
- $notifyPhpIsEOL = Piwik::hasUserSuperUserAccess() && self::isPhpVersion53();
+ $deprecatedMajorPhpVersion = null;
+ if(self::isPhpVersion53()) {
+ $deprecatedMajorPhpVersion = '5.3';
+ } elseif(self::isPhpVersion54()) {
+ $deprecatedMajorPhpVersion = '5.4';
+ }
+
+ $notifyPhpIsEOL = Piwik::hasUserSuperUserAccess() && $deprecatedMajorPhpVersion;
if (!$notifyPhpIsEOL) {
return;
}
- $message = Piwik::translate('General_WarningPiwikWillStopSupportingPHPVersion')
+
+ $nextRequiredMinimumPHP = '5.5';
+
+ $message = Piwik::translate('General_WarningPiwikWillStopSupportingPHPVersion', array($deprecatedMajorPhpVersion, $nextRequiredMinimumPHP))
. "\n "
- . Piwik::translate('General_WarningPhpVersionXIsTooOld', '5.3');
+ . Piwik::translate('General_WarningPhpVersionXIsTooOld', $deprecatedMajorPhpVersion);
$notification = new Notification($message);
$notification->title = Piwik::translate('General_Warning');
@@ -138,7 +148,7 @@ abstract class ControllerAdmin extends Controller
$notification->context = Notification::CONTEXT_WARNING;
$notification->type = Notification::TYPE_TRANSIENT;
$notification->flags = Notification::FLAG_NO_CLEAR;
- NotificationManager::notify('PHP53VersionCheck', $notification);
+ NotificationManager::notify('DeprecatedPHPVersionCheck', $notification);
}
private static function notifyWhenDebugOnDemandIsEnabled($trackerSetting)
@@ -243,4 +253,9 @@ abstract class ControllerAdmin extends Controller
{
return strpos(PHP_VERSION, '5.3') === 0;
}
+
+ private static function isPhpVersion54()
+ {
+ return strpos(PHP_VERSION, '5.4') === 0;
+ }
}
diff --git a/lang/en.json b/lang/en.json
index c525d49631..615ad706c0 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -385,7 +385,7 @@
"VisitTypeExample": "For example, to select all visitors who have returned to the website, including those who have bought something in their previous visits, the API request would contain %s",
"Warning": "Warning",
"WarningPhpVersionXIsTooOld": "The PHP version %s you are using has reached its End of Life (EOL). You are strongly urged to upgrade to a current version, as using this version may expose you to security vulnerabilities and bugs that have been fixed in more recent versions of PHP.",
- "WarningPiwikWillStopSupportingPHPVersion": "Piwik will stop supporting PHP 5.3 in the next major version. Upgrade your PHP version before it's too late!",
+ "WarningPiwikWillStopSupportingPHPVersion": "Piwik will stop supporting PHP %1$s in the next major version. Upgrade your PHP to at least PHP %2$s, before it's too late!",
"WarningFileIntegrityNoManifest": "File integrity check could not be performed due to missing manifest.inc.php.",
"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.",
diff --git a/plugins/CoreAdminHome/stylesheets/generalSettings.less b/plugins/CoreAdminHome/stylesheets/generalSettings.less
index 9d232f789b..dde1da48ed 100644
--- a/plugins/CoreAdminHome/stylesheets/generalSettings.less
+++ b/plugins/CoreAdminHome/stylesheets/generalSettings.less
@@ -8,7 +8,7 @@
}
// hide PHP is deprecated notification in UI test
-.uiTest [notification-id="PHP53VersionCheck"] {
+.uiTest [notification-id="DeprecatedPHPVersionCheck"] {
display: none !important;
}