summaryrefslogtreecommitdiffstats
path: root/lib/private/route
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-03-24 14:55:03 +0100
committerRobin Appelman <icewind@owncloud.com>2014-03-24 14:55:03 +0100
commit0d0aac6fffb2da47054ed19eae835aa7d9904692 (patch)
treead55d9471967736a86eb79e37e47d669d07fd3ce /lib/private/route
parent4c8a83e82fe4dfe5b83e09194060ecbf44f44791 (diff)
downloadnextcloud-server-0d0aac6fffb2da47054ed19eae835aa7d9904692.tar.gz
nextcloud-server-0d0aac6fffb2da47054ed19eae835aa7d9904692.zip
Load the routes when matching or generating a route instead of when creating the router
Diffstat (limited to 'lib/private/route')
-rw-r--r--lib/private/route/router.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 60ba5878401..806bbf51abf 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -158,6 +158,7 @@ class Router implements IRouter {
* @throws \Exception
*/
public function match($url) {
+ $this->loadRoutes();
$matcher = new UrlMatcher($this->root, $this->context);
$parameters = $matcher->match($url);
if (isset($parameters['action'])) {
@@ -196,6 +197,7 @@ class Router implements IRouter {
* @return string
*/
public function generate($name, $parameters = array(), $absolute = false) {
+ $this->loadRoutes();
return $this->getGenerator()->generate($name, $parameters, $absolute);
}