Merge pull request #22354 from owncloud/only-register-when-available

Only register admin page when update is available
This commit is contained in:
Thomas Müller 2016-02-12 19:39:56 +01:00
commit b5bf32bc34
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');
}