From 87d1cdb94567d5514e0a2988f69935d932b58ff6 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sat, 11 Aug 2012 00:04:43 +0200 Subject: Fix for running doing routing in lib/ocs.php --- lib/router.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/router.php') diff --git a/lib/router.php b/lib/router.php index 3ba2125465a..dbcaff4026e 100644 --- a/lib/router.php +++ b/lib/router.php @@ -10,19 +10,21 @@ use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RouteCollection; //use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; class OC_Router { protected $collections = array(); protected $collection = null; protected $root = null; + public function __construct() { + // TODO cache + $this->root = $this->getCollection('root'); + } + /** * loads the api routes */ public function loadRoutes() { - // TODO cache - $this->root = $this->getCollection('root'); foreach(OC_APP::getEnabledApps() as $app){ $file = OC_App::getAppPath($app).'/appinfo/routes.php'; if(file_exists($file)){ -- cgit v1.2.3