summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-11 00:19:00 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-11 00:19:00 +0000
commit2f9eae867c8dcd995608da63f08f8f4a8c01efbf (patch)
tree613a613d6db804922477d294b1ffe73638b16742
parent120ad3a2cdb3e4221b8c5ee0d323168d39879a07 (diff)
Let admins override the theme with a query param
-rw-r--r--core/libraries/Admin_View.php3
-rw-r--r--core/libraries/Theme_View.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/core/libraries/Admin_View.php b/core/libraries/Admin_View.php
index 4a367c94..a6768d8b 100644
--- a/core/libraries/Admin_View.php
+++ b/core/libraries/Admin_View.php
@@ -32,6 +32,9 @@ class Admin_View_Core extends View {
parent::__construct($name);
$this->theme_name = module::get_var("core", "active_admin_theme");
+ if (user::active()->admin) {
+ $this->theme_name = Input::instance()->get("theme", $this->theme_name);
+ }
$this->set_global('theme', $this);
$this->set_global('user', user::active());
}
diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php
index ea39cdfc..64023aa6 100644
--- a/core/libraries/Theme_View.php
+++ b/core/libraries/Theme_View.php
@@ -33,6 +33,9 @@ class Theme_View_Core extends View {
parent::__construct($name);
$this->theme_name = module::get_var("core", "active_theme");
+ if (user::active()->admin) {
+ $this->theme_name = Input::instance()->get("theme", $this->theme_name);
+ }
$this->set_global('theme', $this);
$this->set_global('user', user::active());
$this->set_global("page_type", $page_type);