diff options
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 7a6bc1da..a507e9c8 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,11 +37,11 @@ class Theme_View_Core extends Gallery_View { } $this->item = null; $this->tag = null; - $this->set_global("theme", $this); - $this->set_global("user", identity::active_user()); - $this->set_global("page_type", $page_type); - $this->set_global("page_subtype", $page_subtype); - $this->set_global("page_title", null); + $this->set_global(array("theme" => $this, + "user" => identity::active_user(), + "page_type" => $page_type, + "page_subtype" => $page_subtype, + "page_title" => null)); if ($page_type == "collection") { $this->set_global("thumb_proportion", $this->thumb_proportion()); } @@ -224,6 +224,7 @@ class Theme_View_Core extends Gallery_View { case "head": case "header_bottom": case "header_top": + case "html_attributes": case "page_bottom": case "page_top": case "photo_blocks": @@ -236,13 +237,6 @@ class Theme_View_Core extends Gallery_View { case "thumb_bottom": case "thumb_info": case "thumb_top": - if ($function == "head") { - // Stash any CSS we have already; that came from the theme and we want theme CSS to - // override module CSs - $save_css = $this->css; - $this->css = array(); - } - $blocks = array(); if (method_exists("gallery_theme", $function)) { switch (count($args)) { @@ -281,13 +275,6 @@ class Theme_View_Core extends Gallery_View { array_merge(array($this), $args)); } - if ($function == "head") { - // Merge the theme CSS/JS at the end - $this->css = array_merge($this->css, $save_css); - array_unshift($blocks, $this->combine_files($this->css, "css")); - array_unshift($blocks, $this->combine_files($this->scripts, "javascript")); - } - if (Session::instance()->get("debug")) { if ($function != "head" && $function != "body_attributes") { array_unshift( |