mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-27 18:24:03 -04:00
Normalize our Admin controllers so that functions always print out
their results, as opposed to having them return their view back upstream. This is a little more code in every controller, but it's much less magical and more consistent. Look up the active_theme and active_admin_theme inside the view itself, no need to do that in the controllers. This makes view initialization easier in the controllers.
This commit is contained in:
@@ -28,9 +28,10 @@ class Admin_View_Core extends View {
|
||||
* @param string $theme_name view name
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($name, $theme_name="default") {
|
||||
public function __construct($name) {
|
||||
parent::__construct($name);
|
||||
$this->theme_name = $theme_name;
|
||||
|
||||
$this->theme_name = module::get_var("core", "active_admin_theme");
|
||||
$this->set_global('theme', $this);
|
||||
$this->set_global('user', user::active());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user