Skip to content

Commit

Permalink
Move loading of all the apps to setting the active navigation entry.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bartv2 committed Nov 30, 2012
1 parent 9717cdb commit 8ce3aca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ public static function addNavigationEntry( $data ) {
* 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;
}
Expand Down
1 change: 0 additions & 1 deletion lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ public static function handleRequest() {
return;
}
try {
OC_App::loadApps();
OC::getRouter()->match(OC_Request::getPathInfo());
return;
} catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
Expand Down

0 comments on commit 8ce3aca

Please sign in to comment.