Merge pull request #14273 from owncloud/require-at-least-apcu-4-0-6

Use APCu only if available in version 4.0.6 and higher
This commit is contained in:
Lukas Reschke 2015-02-18 01:07:54 +01:00
commit ceaa193df2
3 changed files with 21 additions and 0 deletions

View File

@ -14,6 +14,8 @@ class APCu extends APC {
return false;
} elseif (!ini_get('apc.enable_cli') && \OC::$CLI) {
return false;
} elseif (version_compare(phpversion('apc'), '4.0.6') === -1) {
return false;
} else {
return true;
}

View File

@ -85,6 +85,10 @@ $template->assign('databaseOverload', $databaseOverload);
// 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);
// add hardcoded forms from the template
$forms = OC_App::getForms('admin');
$l = OC_L10N::get('settings');

View File

@ -143,9 +143,24 @@ if ($_['WindowsWarning']) {
</p>
</div>
<?php
}
// APCU Warning if outdated
if ($_['ApcuOutdatedWarning']) {
?>
<div class="section">
<h2><?php p($l->t('APCu below version 4.0.6 installed'));?></h2>
<p class="securitywarning">
<?php p($l->t('APCu below version 4.0.6 is installed, for stability and performance reasons we recommend to update to a newer APCu version.')); ?>
</p>
</div>
<?php
}
// if module fileinfo available?
if (!$_['has_fileinfo']) {
?>