Only register admin page when update is available

Fixes https://github.com/owncloud/core/issues/22353
This commit is contained in:
Lukas Reschke 2016-02-12 18:45:42 +01:00
parent 0c8021e945
commit ab5768f7dd
1 changed files with 1 additions and 2 deletions

View File

@ -34,8 +34,7 @@ if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) {
if(\OC::$server->getGroupManager()->isAdmin($userObject->getUID()) && $updateChecker->getUpdateState() !== []) {
\OCP\Util::addScript('updatenotification', 'notification');
OC_Hook::connect('\OCP\Config', 'js', $updateChecker, 'getJavaScript');
\OC_App::registerAdmin('updatenotification', 'admin');
}
}
\OC_App::registerAdmin('updatenotification', 'admin');
}