diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-04 09:45:17 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-04 10:12:21 -0700 |
commit | aa0529d557ed0609bf7e5b23a5cf2437f7998c4b (patch) | |
tree | 028337388818b1a1ef0de24c9ee7d62162206e05 /modules/gallery/helpers/theme.php | |
parent | 60c15e41b37fbe6b2adc7789b21b7e5acea3e949 (diff) |
Create a gallery::plugin_path which returns the appropriate path to the module or theme. This checks for the existence of an application/modules or application/themes first.
Diffstat (limited to 'modules/gallery/helpers/theme.php')
-rw-r--r-- | modules/gallery/helpers/theme.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index fb8f7ca7..3ba11aa2 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -30,11 +30,8 @@ class theme_Core { */ static function load_themes() { $modules = Kohana::config("core.modules"); - if (Router::$controller == "admin") { - array_unshift($modules, THEMEPATH . module::get_var("gallery", "active_admin_theme")); - } else { - array_unshift($modules, THEMEPATH . module::get_var("gallery", "active_site_theme")); - } + array_unshift($modules, gallery::plugin_path(module::get_var("gallery", + (Router::$controller == "admin") ? "active_admin_theme" : "active_site_theme"), "theme")); Kohana::config_set("core.modules", $modules); } |