aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-07-28 10:06:26 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-07-29 10:07:01 +0200
commit72ba67815ed15aac9d9511504f61f8c5fa73bff4 (patch)
treebaf8b4f9b0606a4a37ddb1c7ce3906d1a87cb3c4 /settings
parente77b2e53179d24deee1fe720f7a60b5db6f5c502 (diff)
downloadnextcloud-server-72ba67815ed15aac9d9511504f61f8c5fa73bff4.tar.gz
nextcloud-server-72ba67815ed15aac9d9511504f61f8c5fa73bff4.zip
Display warning in security & setup warnings if php version is EOL
Diffstat (limited to 'settings')
-rw-r--r--settings/controller/checksetupcontroller.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/controller/checksetupcontroller.php b/settings/controller/checksetupcontroller.php
index f849e3ed565..ff605b474e2 100644
--- a/settings/controller/checksetupcontroller.php
+++ b/settings/controller/checksetupcontroller.php
@@ -175,6 +175,23 @@ class CheckSetupController extends Controller {
return '';
}
+
+ /*
+ * Whether the php version is still supported (at time of release)
+ * according to: https://secure.php.net/supported-versions.php
+ *
+ * @return array
+ */
+ private function isPhpSupported() {
+ $eol = false;
+
+ //PHP 5.4 is EOL on 14 Sep 2015
+ if (version_compare(PHP_VERSION, '5.5.0') === -1) {
+ $eol = true;
+ }
+
+ return ['eol' => $eol, 'version' => PHP_VERSION];
+ }
/**
* @return DataResponse
@@ -189,6 +206,7 @@ class CheckSetupController extends Controller {
'isUrandomAvailable' => $this->isUrandomAvailable(),
'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'),
'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(),
+ 'phpSupported' => $this->isPhpSupported(),
]
);
}