From 1025e451a7610a9e5b50e7e99e808cb2d1915236 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sat, 11 Aug 2012 01:00:26 +0200 Subject: [PATCH] Add router match to OC::handleRequest --- lib/base.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/base.php b/lib/base.php index b276cf5924..a05d84fbae 100644 --- a/lib/base.php +++ b/lib/base.php @@ -421,6 +421,15 @@ class OC{ header('location: '.OC_Helper::linkToRemote('webdav')); return; } + try { + OC::getRouter()->match(OC_Request::getPathInfo()); + return; + } catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) { + //header('HTTP/1.0 404 Not Found'); + } catch (Symfony\Component\Routing\Exception\MethodNotAllowedException $e) { + OC_Response::setStatus(405); + return; + } // Handle app css files if(substr(OC::$REQUESTEDFILE,-3) == 'css') { self::loadCSSFile();