Load routes before calling actions

This commit is contained in:
Tom Needham 2012-07-28 21:57:24 +00:00
parent c375774fca
commit 9dbe5f3703
1 changed files with 9 additions and 0 deletions

View File

@ -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