diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php index 0a867f1267c..51986631e14 100644 --- a/apps/updatenotification/lib/Controller/AdminController.php +++ b/apps/updatenotification/lib/Controller/AdminController.php @@ -114,7 +114,7 @@ class AdminController extends Controller implements ISettings { 'newVersionString' => (empty($updateState['updateVersion'])) ? '' : $updateState['updateVersion'], 'downloadLink' => (empty($updateState['downloadLink'])) ? '' : $updateState['downloadLink'], 'updaterEnabled' => (empty($updateState['updaterEnabled'])) ? false : $updateState['updaterEnabled'], - + 'outdatedPHP' => version_compare(PHP_VERSION, '5.6') === -1, 'notify_groups' => implode('|', $notifyGroups), ]; diff --git a/apps/updatenotification/templates/admin.php b/apps/updatenotification/templates/admin.php index 78337eb313b..b14c72d83a5 100644 --- a/apps/updatenotification/templates/admin.php +++ b/apps/updatenotification/templates/admin.php @@ -14,6 +14,13 @@ $currentChannel = $_['currentChannel']; ?>
+ + +

+ t('You are running PHP %s. To allow you to upgrade to Nextcloud 11 and higher you need to run at least PHP 5.6. Once you upgraded your PHP version you will be able to receive update notifications for these newer versions.', [PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION])); ?> +

+ + t('A new version is available: %s', [$newVersionString])); ?> diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index e731b9fb428..e4814a8c639 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -125,6 +125,7 @@ class AdminControllerTest extends TestCase { 'newVersionString' => '8.1.2', 'downloadLink' => 'https://downloads.nextcloud.org/server', 'updaterEnabled' => true, + 'outdatedPHP' => version_compare(PHP_VERSION, '5.6') === -1, 'notify_groups' => 'admin', ]; @@ -171,6 +172,7 @@ class AdminControllerTest extends TestCase { 'newVersionString' => '', 'downloadLink' => '', 'updaterEnabled' => 0, + 'outdatedPHP' => version_compare(PHP_VERSION, '5.6') === -1, 'notify_groups' => 'admin', ];