summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-01-14 07:35:14 -0800
committerBart Visscher <bartv@thisnet.nl>2013-01-14 07:35:14 -0800
commitfa78fbe0c3e281c91468bee92c871be7b1e48c79 (patch)
treeabbd399cdfa6f438791a1955957b6e63e446111f /lib
parente51055cd10ef3f201423d24f959f3bec675a06b3 (diff)
parent75dbe8866499102b9f97c3584f5b71b50d53b07e (diff)
downloadnextcloud-server-fa78fbe0c3e281c91468bee92c871be7b1e48c79.tar.gz
nextcloud-server-fa78fbe0c3e281c91468bee92c871be7b1e48c79.zip
Merge pull request #1112 from Raydiation/master
This fixes a problem that prevented app routes from being loaded after ocs_api merge
Diffstat (limited to 'lib')
-rw-r--r--lib/router.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/router.php b/lib/router.php
index 27e14c38abf..746b68c2c0c 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -49,6 +49,7 @@ class OC_Router {
$files = $this->getRoutingFiles();
$files[] = 'settings/routes.php';
$files[] = 'core/routes.php';
+ $files[] = 'ocs/routes.php';
$this->cache_key = OC_Cache::generateCacheKeyFromFiles($files);
}
return $this->cache_key;
@@ -58,23 +59,6 @@ class OC_Router {
* loads the api routes
*/
public function loadRoutes() {
-
- // TODO cache
- $this->root = $this->getCollection('root');
- foreach(OC_APP::getEnabledApps() as $app){
- $file = OC_App::getAppPath($app).'/appinfo/routes.php';
- if(file_exists($file)){
- $this->useCollection($app);
- require_once($file);
- $collection = $this->getCollection($app);
- $this->root->addCollection($collection, '/apps/'.$app);
- }
- }
- // include ocs routes
- require_once(OC::$SERVERROOT.'/ocs/routes.php');
- $collection = $this->getCollection('ocs');
- $this->root->addCollection($collection, '/ocs');
-
foreach($this->getRoutingFiles() as $app => $file) {
$this->useCollection($app);
require_once $file;
@@ -85,6 +69,10 @@ class OC_Router {
require_once 'settings/routes.php';
require_once 'core/routes.php';
+ // include ocs routes
+ require_once 'ocs/routes.php';
+ $collection = $this->getCollection('ocs');
+ $this->root->addCollection($collection, '/ocs');
}
protected function getCollection($name) {