diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-11 00:04:43 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-11 00:04:43 +0200 |
commit | 87d1cdb94567d5514e0a2988f69935d932b58ff6 (patch) | |
tree | 8dd51c1d5baedcfdc897d47aca678b9b0a1c69ae /lib/router.php | |
parent | f63b9b44d8ac62a136d4cd6844e72af7a8044703 (diff) | |
download | nextcloud-server-87d1cdb94567d5514e0a2988f69935d932b58ff6.tar.gz nextcloud-server-87d1cdb94567d5514e0a2988f69935d932b58ff6.zip |
Fix for running doing routing in lib/ocs.php
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 8 |
1 files changed, 5 insertions, 3 deletions
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)){ |