Skip to content
Snippets Groups Projects
Commit a8094aba authored by Bernhard Posselt's avatar Bernhard Posselt
Browse files

load classpaths of apps before routes

parent d85e440a
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment