diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-08-29 21:15:58 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-08-29 21:15:58 -0700 |
commit | ab598b2931dbff1165e66bc271e6b49166fe0a7e (patch) | |
tree | bac5ccfb67b5a0b6d13dc20d930d2505d553d8c1 /modules/gallery/libraries | |
parent | 2c717b18d36f8d4ae6b7b94beeb0fd99a2984c9a (diff) |
Put the theme CSS at the end of the module CSS so that the theme has
the final say. Fixes ticket #1315.
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 9 |
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")); } |