summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/Admin_View.php6
-rw-r--r--modules/gallery/libraries/Theme_View.php13
2 files changed, 7 insertions, 12 deletions
diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php
index c190f110..a990e4ca 100644
--- a/modules/gallery/libraries/Admin_View.php
+++ b/modules/gallery/libraries/Admin_View.php
@@ -27,12 +27,6 @@ class Admin_View_Core extends Gallery_View {
* @return void
*/
public function __construct($name) {
- $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::add("error", "Unable to locate theme '$theme_name', switching to default theme.");
- }
parent::__construct($name);
$this->theme_name = module::get_var("gallery", "active_admin_theme");
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 03f67671..f78a7018 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -29,12 +29,6 @@ class Theme_View_Core extends Gallery_View {
* @return void
*/
public function __construct($name, $page_type, $page_subtype) {
- $theme_name = module::get_var("gallery", "active_site_theme");
- if (!file_exists(THEMEPATH . $theme_name)) {
- module::set_var("gallery", "active_site_theme", "wind");
- theme::load_themes();
- Kohana_Log::add("error", "Unable to locate theme '$theme_name', switching to default theme.");
- }
parent::__construct($name);
$this->theme_name = module::get_var("gallery", "active_site_theme");
@@ -271,6 +265,13 @@ class Theme_View_Core extends Gallery_View {
}
}
+ $helper_class = theme::$site_theme_name . "_theme";
+ if (method_exists($helper_class, $function)) {
+ $blocks[] = call_user_func_array(
+ array($helper_class, $function),
+ array_merge(array($this), $args));
+ }
+
if ($function == "head") {
array_unshift($blocks, $this->combine_files($this->css, "css"));
array_unshift($blocks, $this->combine_files($this->scripts, "javascript"));