summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-07-28 21:57:24 +0000
committerTom Needham <needham.thomas@gmail.com>2012-07-28 21:57:24 +0000
commit9dbe5f3703afd84c701d0d1347c06f1b07ff7fe6 (patch)
tree1630114655cae53092bca09171506d782f0ad141 /lib/api.php
parentc375774fca619ee4bd886a9c675908c4006cc980 (diff)
downloadnextcloud-server-9dbe5f3703afd84c701d0d1347c06f1b07ff7fe6.tar.gz
nextcloud-server-9dbe5f3703afd84c701d0d1347c06f1b07ff7fe6.zip
Load routes before calling actions
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/api.php b/lib/api.php
index eaa2bb42f8c..cf40167b07a 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -53,6 +53,15 @@ class OC_API {
*/
public function call($parameters){
+ // Get the routes
+ // TODO cache
+ foreach(OC_APP::getEnabledApps() as $app){
+ $file = OC_App::getAppPath($app).'/appinfo/routes.php';
+ if(file_exists($file)){
+ require_once($file);
+ }
+ }
+
$name = $parameters['_name'];
$response = array();
// Loop through registered actions