diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-09 09:59:41 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-09 09:59:41 -0800 |
commit | 0222c589ac7c006c09dca6cea09cae9a1006a0b4 (patch) | |
tree | abff7952999dab1f32a86863958ec3a02c0e8100 /lib | |
parent | e68cf72458e9cfb888ef8b24d3e255fadf6d18a7 (diff) | |
parent | fba9739448dfca7234c3910f88ce56f0f28e6bad (diff) | |
download | nextcloud-server-0222c589ac7c006c09dca6cea09cae9a1006a0b4.tar.gz nextcloud-server-0222c589ac7c006c09dca6cea09cae9a1006a0b4.zip |
Merge pull request #1546 from owncloud/fix-loading-hooks
Fix loading hooks when going though the routing system
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.php | 17 | ||||
-rw-r--r-- | lib/base.php | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/app.php b/lib/app.php index 54f16d6bdcd..ca256ed1aaa 100644 --- a/lib/app.php +++ b/lib/app.php @@ -295,6 +295,23 @@ class OC_App{ } /** + * @brief Get the navigation entries for the $app + * @param string $app app + * @return array of the $data added with addNavigationEntry + */ + public static function getAppNavigationEntries($app) { + if(is_file(self::getAppPath($app).'/appinfo/app.php')) { + $save = self::$navigation; + self::$navigation = array(); + require $app.'/appinfo/app.php'; + $app_entries = self::$navigation; + self::$navigation = $save; + return $app_entries; + } + return array(); + } + + /** * @brief gets the active Menu entry * @return string id or empty string * diff --git a/lib/base.php b/lib/base.php index 3de38258d03..c60a97100f4 100644 --- a/lib/base.php +++ b/lib/base.php @@ -557,6 +557,7 @@ class OC { if (!self::$CLI) { try { + OC_App::loadApps(); OC::getRouter()->match(OC_Request::getPathInfo()); return; } catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) { |