summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Theme_View.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-08-30 22:06:26 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-08-30 22:06:26 -0700
commit866f8eefc66f24f9fcfb9f20bdc0add3a654db76 (patch)
tree11f39ff6251b1c90cc3f03a37fd9ec67243db991 /modules/gallery/libraries/Theme_View.php
parent0f2daf29acc051e7fe79abc625406684e9da8196 (diff)
parentd5ebcb91ad8401df8a393f84ade82150467dbf33 (diff)
Fix for ticket #1320. Hook the loading of the initial albums and check to see if the loaded item is the requested item.
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r--modules/gallery/libraries/Theme_View.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 46291005..7a6bc1da 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -236,6 +236,13 @@ 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)) {
@@ -275,6 +282,8 @@ class Theme_View_Core extends Gallery_View {
}
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"));
}