diff --git a/view/Requirements.php b/view/Requirements.php index 00d439af7..564ebb426 100644 --- a/view/Requirements.php +++ b/view/Requirements.php @@ -1074,16 +1074,18 @@ class Requirements_Backend { * @see Requirements::themedCSS() */ public function themedCSS($name, $module = null, $media = null) { - $theme = SSViewer::current_theme(); - $path = SSViewer::get_theme_folder() . "/css/$name.css"; + $path = SSViewer::get_theme_folder(); + $abspath = BASE_PATH . DIRECTORY_SEPARATOR . $path; + $css = "/css/$name.css"; - if (file_exists(BASE_PATH . '/' . $path)) { - $this->css($path, $media); - return; + if ($module && file_exists($abspath.'_'.$module.$css)) { + $this->css($path.'_'.$module.$css, $media); } - - if ($module) { - $this->css("$module/css/$name.css"); + else if (file_exists($abspath.$css)) { + $this->css($path.$css, $media); + } + else if ($module) { + $this->css($module.$css); } }