]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move loading of all the apps to setting the active navigation entry.
authorBart Visscher <bartv@thisnet.nl>
Fri, 30 Nov 2012 11:47:40 +0000 (12:47 +0100)
committerBart Visscher <bartv@thisnet.nl>
Fri, 30 Nov 2012 11:47:44 +0000 (12:47 +0100)
We can't do the loading before matching the route, because some routes
need to do the loading after matching of the route. For example the
navigation detection of the app settings page.

lib/app.php
lib/base.php

index 79c1d83314ff5903fdd121601bd2d32d64bd5d94..5d4fbbd9c2322420004b0282cb18a95b65f9c8d0 100755 (executable)
@@ -253,6 +253,8 @@ class OC_App{
         * highlighting the current position of the user.
         */
        public static function setActiveNavigationEntry( $id ) {
+               // load all the apps, to make sure we have all the navigation entries
+               self::loadApps();
                self::$activeapp = $id;
                return true;
        }
index dff73ef1ae8df31eaec321b23d10addc0864042e..f600800b617a2e3a9895b9e062036af1b78e29e9 100644 (file)
@@ -512,7 +512,6 @@ class OC{
                        return;
                }
                try {
-                       OC_App::loadApps();
                        OC::getRouter()->match(OC_Request::getPathInfo());
                        return;
                } catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {