summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-10-23 22:28:40 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-10-23 22:28:40 -0600
commite13f92abab2cef2d58cc4e560e18aa65c138a264 (patch)
treee30807ca5c91a181912b746c0d89cd321ec5ee8b /modules/gallery/helpers
parentbb47b495a7d719ee679e4747e9fd5b8f7c39b58a (diff)
parent5fb0434a478051f77ab241f62656ad941225c397 (diff)
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_event.php1
-rw-r--r--modules/gallery/helpers/theme.php5
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index e0de2152..d45f5316 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -23,6 +23,7 @@ class gallery_event_Core {
* Initialization.
*/
static function gallery_ready() {
+ theme::load_themes(Input::instance()->server("PATH_INFO"));
user::load_user();
locales::set_request_locale();
}
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php
index fb8f7ca7..5588fbce 100644
--- a/modules/gallery/helpers/theme.php
+++ b/modules/gallery/helpers/theme.php
@@ -28,14 +28,13 @@ class theme_Core {
* Load the active theme. This is called at bootstrap time. We will only ever have one theme
* active for any given request.
*/
- static function load_themes() {
+ static function load_themes($path) {
$modules = Kohana::config("core.modules");
- if (Router::$controller == "admin") {
+ if (strpos($path, "/admin") === 0) {
array_unshift($modules, THEMEPATH . module::get_var("gallery", "active_admin_theme"));
} else {
array_unshift($modules, THEMEPATH . module::get_var("gallery", "active_site_theme"));
}
-
Kohana::config_set("core.modules", $modules);
}