Merge pull request #3888 from owncloud/ocs_api_fixes

Ocs api fixes
This commit is contained in:
Bart Visscher 2013-07-03 12:33:04 -07:00
commit 20be58bfdc
2 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,8 @@ class OC_API {
OC::getRouter()->useCollection('ocs');
OC::getRouter()->create($name, $url)
->method($method)
->defaults($defaults)
->requirements($requirements)
->action('OC_API', 'call');
self::$actions[$name] = array();
}

View File

@ -26,7 +26,7 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
try {
OC::getRouter()->match('/ocs'.$_SERVER['PATH_INFO']);
OC::getRouter()->match('/ocs'.OC_Request::getRawPathInfo());
} catch (ResourceNotFoundException $e) {
OC_OCS::notFound();
} catch (MethodNotAllowedException $e) {