diff options
| author | 2014-12-06 15:20:20 +0100 | |
|---|---|---|
| committer | 2014-12-06 15:20:20 +0100 | |
| commit | a08c382e0651f22a7db06feba225f3d49289763d (patch) | |
| tree | fd1077c02192bf86674c3144efc158a78019d6c1 /lib/Minz/Dispatcher.php | |
| parent | c6a682deb94111c1e14cf10e565da3f4214f02dc (diff) | |
Separate views registration from controllers one.
- Add an Extension->registerViews() method.
- Views are first searched in extension paths, then in APP_PATH.
- It gives a way to override easily existing controllers / views.
- Change include into an include_once in Dispatcher for new controllers.
See https://github.com/FreshRSS/FreshRSS/issues/252
Diffstat (limited to 'lib/Minz/Dispatcher.php')
| -rw-r--r-- | lib/Minz/Dispatcher.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php index edd59c7cc..125ce5757 100644 --- a/lib/Minz/Dispatcher.php +++ b/lib/Minz/Dispatcher.php @@ -95,10 +95,6 @@ class Minz_Dispatcher { Minz_Exception::ERROR ); } - - if (self::isRegistered($base_name)) { - $this->setViewPath($this->controller, $base_name); - } } /** @@ -154,7 +150,7 @@ class Minz_Dispatcher { private static function loadController($base_name) { $base_path = self::$registrations[$base_name]; $controller_filename = $base_path . '/controllers/' . $base_name . 'Controller.php'; - include($controller_filename); + include_once $controller_filename; } private static function setViewPath($controller, $base_name) { |
