summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-23 19:58:15 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-23 19:58:15 -0700
commitcdf5a4fcbf8ccbe90b0d2a41d08e8dc65626f305 (patch)
treec2f083f347305ed92e52d8213f258cd7521c034e /modules/gallery/helpers
parent8d430259fe641f2680eeacad519744de1d02aac4 (diff)
parent68411cc903a1fedd5014763f55f3925c5a971b0f (diff)
Merge branch 'master' into talmdal_dev
Conflicts: modules/gallery/helpers/gallery_event.php
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_event.php3
-rw-r--r--modules/gallery/helpers/theme.php5
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index b6afa2c8..91f3e717 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -23,7 +23,8 @@ class gallery_event_Core {
* Initialization.
*/
static function gallery_ready() {
- identity::load_user();
+ 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);
}