From 7a24f0cd8d28e60360127da19e40bff4b2e04168 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Mon, 30 Jul 2012 21:03:41 +0200 Subject: Make calling ocs/v1.php/config work --- ocs/v1.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ocs') diff --git a/ocs/v1.php b/ocs/v1.php index ab0dc80f4ba..4580221e600 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -22,5 +22,13 @@ */ require_once('../lib/base.php'); -@ob_clean(); -OC_OCS::handle(); +use Symfony\Component\Routing\Exception\ResourceNotFoundException; + +OC::$router->useCollection('ocs'); +OC::$router->loadRoutes(); + +try { + OC::$router->match($_SERVER['PATH_INFO']); +} catch (ResourceNotFoundException $e) { + OC_OCS::notFound(); +} -- cgit v1.2.3