Merge pull request #5016 from nextcloud/reset-opcache-on-updater-page-load

Reset opcache if update is detected
This commit is contained in:
Roeland Jago Douma 2017-05-22 14:52:20 +02:00 committed by GitHub
commit cc5393f536
1 changed files with 3 additions and 0 deletions

View File

@ -292,6 +292,9 @@ class OC {
*/
public static function checkUpgrade($showTemplate = true) {
if (\OCP\Util::needUpgrade()) {
if (function_exists('opcache_reset')) {
opcache_reset();
}
$systemConfig = \OC::$server->getSystemConfig();
if ($showTemplate && !$systemConfig->getValue('maintenance', false)) {
self::printUpgradePage();