diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-02 15:03:27 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-02 15:42:48 +0200 |
commit | bdc82dcfb900050f66d7e632c2808363b57e8a96 (patch) | |
tree | adac931027d894f3541f0e40e25c54b9bb6d869f /settings/admin.php | |
parent | 3ebc8f0564395fbb519fc4275e0f6f883df708b7 (diff) | |
download | nextcloud-server-bdc82dcfb900050f66d7e632c2808363b57e8a96.tar.gz nextcloud-server-bdc82dcfb900050f66d7e632c2808363b57e8a96.zip |
Check for redis to be 2.2.5+
Diffstat (limited to 'settings/admin.php')
-rw-r--r-- | settings/admin.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/settings/admin.php b/settings/admin.php index f2e01adab11..ee252ceb141 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -35,6 +35,7 @@ OC_Util::checkAdminUser(); OC_App::setActiveNavigationEntry("admin"); $template = new OC_Template('settings', 'admin', 'user'); +$l = OC_L10N::get('settings'); $showLog = (\OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud'); $numEntriesToLoad = 3; @@ -128,13 +129,23 @@ $template->assign('getenvServerNotWorking', empty($path)); // warn if Windows is used $template->assign('WindowsWarning', OC_Util::runningOnWindows()); -// warn if outdated version of APCu is used -$template->assign('ApcuOutdatedWarning', - extension_loaded('apcu') && version_compare(phpversion('apc'), '4.0.6') === -1); +// warn if outdated version of a memcache module is used +$caches = [ + 'apcu' => ['name' => $l->t('APCu'), 'version' => '4.0.6'], + 'redis' => ['name' => $l->t('Redis'), 'version' => '2.2.5'], +]; + +$outdatedCaches = []; +foreach ($caches as $php_module => $data) { + $isOutdated = extension_loaded($php_module) && version_compare(phpversion($php_module), $data['version'], '<'); + if ($isOutdated) { + $outdatedCaches[$php_module] = $data; + } +} +$template->assign('OutdatedCacheWarning', $outdatedCaches); // add hardcoded forms from the template $forms = OC_App::getForms('admin'); -$l = OC_L10N::get('settings'); $formsAndMore = array(); if ($request->getServerProtocol() !== 'https' || !OC_Util::isAnnotationsWorking() || $suggestedOverwriteCliUrl || !OC_Util::isSetLocaleWorking() || |