diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-01-17 21:42:33 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-01-17 21:42:46 +0100 |
commit | a8094abac7ea0b64d5e523192892b2d3b063fba9 (patch) | |
tree | 8f2719c4b934de6ef8ac6485b85b2f871d08b881 | |
parent | d85e440aa174c06f805b2e25a80609d82399e147 (diff) | |
download | nextcloud-server-a8094abac7ea0b64d5e523192892b2d3b063fba9.tar.gz nextcloud-server-a8094abac7ea0b64d5e523192892b2d3b063fba9.zip |
load classpaths of apps before routes
-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 6896c91822e..1d525f7e19d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -321,6 +321,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 @@ -537,6 +549,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; |