From 6ba2623485655460440a972e34a8a2a2fda02821 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 2 Aug 2012 17:59:18 +0200 Subject: Move loading of routes to OC::getRouter function --- lib/router.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/router.php') diff --git a/lib/router.php b/lib/router.php index c3864cfc91c..5c5171cf82d 100644 --- a/lib/router.php +++ b/lib/router.php @@ -16,10 +16,15 @@ class OC_Router { protected $collections = array(); protected $collection = null; + public function __construct() { + // TODO cache + $this->loadRoutes(); + } + /** * loads the api routes */ - public function loadRoutes(){ + public function loadRoutes() { // TODO cache foreach(OC_APP::getEnabledApps() as $app){ $file = OC_App::getAppPath($app).'/appinfo/routes.php'; -- cgit v1.2.3