summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Admin_View.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
committerAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
commit0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch)
tree6877946232f1b01b1c8709054c689f6658cef34f /modules/gallery/libraries/Admin_View.php
parent218493c50be9362d4abed6900a816308fee5d978 (diff)
parent9379308f91a476f790fb8d444536719535c584e4 (diff)
Merge commit 'upstream/master'
Conflicts: modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/gallery/libraries/Admin_View.php')
-rw-r--r--modules/gallery/libraries/Admin_View.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php
index 21b70df6..cbb781a1 100644
--- a/modules/gallery/libraries/Admin_View.php
+++ b/modules/gallery/libraries/Admin_View.php
@@ -27,29 +27,27 @@ class Admin_View_Core extends Gallery_View {
* @return void
*/
public function __construct($name) {
- $theme_name = module::get_var("gallery", "active_site_theme");
- if (!file_exists("themes/$theme_name")) {
- module::set_var("gallery", "active_site_theme", "admin_default");
+ $theme_name = module::get_var("gallery", "active_admin_theme");
+ if (!file_exists(THEMEPATH . $theme_name)) {
+ module::set_var("gallery", "active_admin_theme", "admin_wind");
theme::load_themes();
Kohana::log("error", "Unable to locate theme '$theme_name', switching to default theme.");
}
parent::__construct($name);
$this->theme_name = module::get_var("gallery", "active_admin_theme");
- if (user::active()->admin) {
+ if (identity::active_user()->admin) {
$this->theme_name = Input::instance()->get("theme", $this->theme_name);
}
$this->sidebar = "";
$this->set_global("theme", $this);
- $this->set_global("user", user::active());
+ $this->set_global("user", identity::active_user());
}
public function admin_menu() {
$menu = Menu::factory("root");
- gallery::admin_menu($menu, $this);
module::event("admin_menu", $menu, $this);
- $menu->compact();
- return $menu;
+ return $menu->render();
}
/**
@@ -97,7 +95,7 @@ class Admin_View_Core extends Gallery_View {
if (Session::instance()->get("debug")) {
if ($function != "admin_head") {
array_unshift(
- $blocks, "<div class=\"gAnnotatedThemeBlock gAnnotatedThemeBlock_$function\">" .
+ $blocks, "<div class=\"g-annotated-theme-block g-annotated-theme-block_$function\">" .
"<div class=\"title\">$function</div>");
$blocks[] = "</div>";
}