diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-16 22:18:21 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-16 22:18:21 -0400 |
commit | 08e09c1cac39eb0836ccf11e1ad411832d424022 (patch) | |
tree | d7c77830c4ee0bdcc02b83c210659f810c5c2c53 /app | |
parent | 8a2428496f9cc653f526bcbf7b7d2c55bc81158c (diff) |
Fix regression due to previous code change
Diffstat (limited to 'app')
-rw-r--r-- | app/Core/Router.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/Core/Router.php b/app/Core/Router.php index 36bbfd55..902c7de6 100644 --- a/app/Core/Router.php +++ b/app/Core/Router.php @@ -211,19 +211,19 @@ class Router extends Base public function dispatch($uri, $query_string = '') { if (! empty($_GET['controller']) && ! empty($_GET['action'])) { - $controller = $this->sanitize($_GET['controller'], 'app'); - $action = $this->sanitize($_GET['action'], 'index'); + $this->controller = $this->sanitize($_GET['controller'], 'app'); + $this->action = $this->sanitize($_GET['action'], 'index'); $plugin = ! empty($_GET['plugin']) ? $this->sanitize($_GET['plugin'], '') : ''; } else { - list($controller, $action) = $this->findRoute($this->getPath($uri, $query_string)); // TODO: add plugin for routes + list($this->controller, $this->action) = $this->findRoute($this->getPath($uri, $query_string)); // TODO: add plugin for routes $plugin = ''; } - $class = empty($plugin) ? '\Controller\\'.ucfirst($controller) : '\Plugin\\'.ucfirst($plugin).'\Controller\\'.ucfirst($controller); + $class = empty($plugin) ? '\Controller\\'.ucfirst($this->controller) : '\Plugin\\'.ucfirst($plugin).'\Controller\\'.ucfirst($this->controller); $instance = new $class($this->container); - $instance->beforeAction($controller, $action); - $instance->$action(); + $instance->beforeAction($this->controller, $this->action); + $instance->{$this->action}(); } } |