diff options
Diffstat (limited to 'lib/private/api.php')
-rw-r--r-- | lib/private/api.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/api.php b/lib/private/api.php index 75d87b333d5..f5576af2ad8 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -65,6 +65,7 @@ class OC_API { $name = strtolower($method).$url; $name = str_replace(array('/', '{', '}'), '_', $name); if(!isset(self::$actions[$name])) { + $oldCollection = OC::$server->getRouter()->getCurrentCollection(); OC::$server->getRouter()->useCollection('ocs'); OC::$server->getRouter()->create($name, $url) ->method($method) @@ -72,7 +73,7 @@ class OC_API { ->requirements($requirements) ->action('OC_API', 'call'); self::$actions[$name] = array(); - OC::$server->getRouter()->useCollection('root'); + OC::$server->getRouter()->useCollection($oldCollection); } self::$actions[$name][] = array('app' => $app, 'action' => $action, 'authlevel' => $authLevel); } |