diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-01-19 09:44:48 -0800 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-01-19 09:44:48 -0800 |
commit | f1939866f38a6d0b148e8e26d12d442b9edfd595 (patch) | |
tree | dda2147e55ae839a7063b24d060191cd1d056e03 /lib/base.php | |
parent | 53b95cb8fd303e2daa392af23d338f7c9a85f6f4 (diff) | |
parent | 2b95ae1e6d2296ef81259e6762fb3e6662f3bc6c (diff) | |
download | nextcloud-server-f1939866f38a6d0b148e8e26d12d442b9edfd595.tar.gz nextcloud-server-f1939866f38a6d0b148e8e26d12d442b9edfd595.zip |
Merge pull request #1214 from Raydiation/master
Load Classpaths of apps before appinfo/routes.php
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index af6a1b8b85a..4b198c4f784 100644 --- a/lib/base.php +++ b/lib/base.php @@ -327,6 +327,18 @@ class OC return OC::$router; } + + public static function loadAppClassPaths() + { + foreach(OC_APP::getEnabledApps() as $app) { + $file = OC_App::getAppPath($app).'/appinfo/classpath.php'; + if(file_exists($file)) { + require_once $file; + } + } + } + + public static function init() { // register autoloader @@ -543,6 +555,11 @@ class OC header('location: ' . OC_Helper::linkToRemote('webdav')); return; } + + // load all the classpaths from the enabled apps so they are available + // in the routing files of each app + OC::loadAppClassPaths(); + try { OC::getRouter()->match(OC_Request::getPathInfo()); return; |