]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not double cherck app update 3836/head
authorMorris Jobke <hey@morrisjobke.de>
Tue, 14 Mar 2017 00:07:41 +0000 (18:07 -0600)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 14 Mar 2017 00:07:41 +0000 (18:07 -0600)
In base.php the apps are already checked for an update. No need to
repeat this during loading of the app.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/Updater.php
lib/private/legacy/app.php

index 30a9a80cef4d993cb67a9d6e8b28ee36f56c347c..4427e4c48dc3b220a06cea7afdceb5db75d1a48b 100644 (file)
@@ -365,7 +365,7 @@ class Updater extends BasicEmitter {
                                        // load authentication, filesystem and logging apps after
                                        // upgrading them. Other apps my need to rely on modifying
                                        // user and/or filesystem aspects.
-                                       \OC_App::loadApp($appId, false);
+                                       \OC_App::loadApp($appId);
                                }
                        }
                }
index d5af15bdc20815a33273f102d0e4c14ede102283..f89f32f069ac66f42971340d28eab51d675a8c2f 100644 (file)
@@ -134,10 +134,8 @@ class OC_App {
         * load a single 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;
                $appPath = self::getAppPath($app);
                if($appPath === false) {
@@ -149,9 +147,6 @@ class OC_App {
 
                if (is_file($appPath . '/appinfo/app.php')) {
                        \OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
-                       if ($checkUpgrade and self::shouldUpgrade($app)) {
-                               throw new \OC\NeedsUpdateException();
-                       }
                        self::requireAppFile($app);
                        if (self::isType($app, array('authentication'))) {
                                // since authentication apps affect the "is app enabled for group" check,
@@ -1138,7 +1133,7 @@ class OC_App {
                unset(self::$appVersion[$appId]);
                // run upgrade code
                if (file_exists($appPath . '/appinfo/update.php')) {
-                       self::loadApp($appId, false);
+                       self::loadApp($appId);
                        include $appPath . '/appinfo/update.php';
                }
                self::setupBackgroundJobs($appData['background-jobs']);
@@ -1183,7 +1178,7 @@ class OC_App {
                        return;
                }
                // load the app
-               self::loadApp($appId, false);
+               self::loadApp($appId);
 
                $dispatcher = OC::$server->getEventDispatcher();