Merge pull request #1214 from Raydiation/master
Load Classpaths of apps before appinfo/routes.php
This commit is contained in:
commit
f1939866f3
17
lib/base.php
17
lib/base.php
|
@ -327,6 +327,18 @@ class OC
|
||||||
return OC::$router;
|
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()
|
public static function init()
|
||||||
{
|
{
|
||||||
// register autoloader
|
// register autoloader
|
||||||
|
@ -543,6 +555,11 @@ class OC
|
||||||
header('location: ' . OC_Helper::linkToRemote('webdav'));
|
header('location: ' . OC_Helper::linkToRemote('webdav'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// load all the classpaths from the enabled apps so they are available
|
||||||
|
// in the routing files of each app
|
||||||
|
OC::loadAppClassPaths();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
OC::getRouter()->match(OC_Request::getPathInfo());
|
OC::getRouter()->match(OC_Request::getPathInfo());
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue