aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-07-30 20:52:47 +0200
committerBart Visscher <bartv@thisnet.nl>2012-07-30 21:19:02 +0200
commit180bd69dbb21dc6e53533a7d93972445b2ff922e (patch)
treeb952496589ed874a2ab59bbd908d0ca80573fa51
parent95d3b83a77f189569bbf38a54f771af1b85a9406 (diff)
downloadnextcloud-server-180bd69dbb21dc6e53533a7d93972445b2ff922e.tar.gz
nextcloud-server-180bd69dbb21dc6e53533a7d93972445b2ff922e.zip
Fix OC_API::register
-rw-r--r--lib/api.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php
index 00a3dc108e1..fd2c621f389 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -40,8 +40,10 @@ class OC_API {
*/
public static function register($method, $url, $action, $app){
$name = strtolower($method).$url;
+ $name = str_replace(array('/', '{', '}'), '_', $name);
if(!isset(self::$actions[$name])){
- OC_Router::create($name, $url.'.{format}')
+ OC::$router->create($name, $url.'.{_format}')
+ ->defaults(array('_format'=>'xml'))
->action('OC_API', 'call');
self::$actions[$name] = array();
}