Merge pull request #3836 from nextcloud/do-not-double-check-app-update
Do not check for app update twice
This commit is contained in:
commit
25553172f4
|
@ -365,7 +365,7 @@ class Updater extends BasicEmitter {
|
||||||
// load authentication, filesystem and logging apps after
|
// load authentication, filesystem and logging apps after
|
||||||
// upgrading them. Other apps my need to rely on modifying
|
// upgrading them. Other apps my need to rely on modifying
|
||||||
// user and/or filesystem aspects.
|
// user and/or filesystem aspects.
|
||||||
\OC_App::loadApp($appId, false);
|
\OC_App::loadApp($appId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,10 +134,8 @@ class OC_App {
|
||||||
* load a single app
|
* load a single app
|
||||||
*
|
*
|
||||||
* @param string $app
|
* @param string $app
|
||||||
* @param bool $checkUpgrade whether an upgrade check should be done
|
|
||||||
* @throws \OC\NeedsUpdateException
|
|
||||||
*/
|
*/
|
||||||
public static function loadApp($app, $checkUpgrade = true) {
|
public static function loadApp($app) {
|
||||||
self::$loadedApps[] = $app;
|
self::$loadedApps[] = $app;
|
||||||
$appPath = self::getAppPath($app);
|
$appPath = self::getAppPath($app);
|
||||||
if($appPath === false) {
|
if($appPath === false) {
|
||||||
|
@ -149,9 +147,6 @@ class OC_App {
|
||||||
|
|
||||||
if (is_file($appPath . '/appinfo/app.php')) {
|
if (is_file($appPath . '/appinfo/app.php')) {
|
||||||
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
|
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
|
||||||
if ($checkUpgrade and self::shouldUpgrade($app)) {
|
|
||||||
throw new \OC\NeedsUpdateException();
|
|
||||||
}
|
|
||||||
self::requireAppFile($app);
|
self::requireAppFile($app);
|
||||||
if (self::isType($app, array('authentication'))) {
|
if (self::isType($app, array('authentication'))) {
|
||||||
// since authentication apps affect the "is app enabled for group" check,
|
// since authentication apps affect the "is app enabled for group" check,
|
||||||
|
@ -1138,7 +1133,7 @@ class OC_App {
|
||||||
unset(self::$appVersion[$appId]);
|
unset(self::$appVersion[$appId]);
|
||||||
// run upgrade code
|
// run upgrade code
|
||||||
if (file_exists($appPath . '/appinfo/update.php')) {
|
if (file_exists($appPath . '/appinfo/update.php')) {
|
||||||
self::loadApp($appId, false);
|
self::loadApp($appId);
|
||||||
include $appPath . '/appinfo/update.php';
|
include $appPath . '/appinfo/update.php';
|
||||||
}
|
}
|
||||||
self::setupBackgroundJobs($appData['background-jobs']);
|
self::setupBackgroundJobs($appData['background-jobs']);
|
||||||
|
@ -1183,7 +1178,7 @@ class OC_App {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// load the app
|
// load the app
|
||||||
self::loadApp($appId, false);
|
self::loadApp($appId);
|
||||||
|
|
||||||
$dispatcher = OC::$server->getEventDispatcher();
|
$dispatcher = OC::$server->getEventDispatcher();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue