X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Ftemplate%2FTemplate.class.php;h=b5c761b1ebc3ff413a27e32a4bc141a02893ecf1;hp=43c83c63e719453c011fa6ffbce5f47ce99ec215;hb=eb2425ec0610455c098bfcd715292cd0ec525c4c;hpb=d4c2aa240cb09ef33ece91769f2781186edffd2d diff --git a/class/template/Template.class.php b/class/template/Template.class.php index 43c83c63..b5c761b1 100644 --- a/class/template/Template.class.php +++ b/class/template/Template.class.php @@ -1,7 +1,4 @@ $file, + 'PATH' => substr($file,strlen(SM_PATH)), 'SET_ID' => $template_set_id, 'ENGINE' => $engine, ); @@ -740,9 +741,9 @@ class Template $engine = $this->get_template_config($template_set_id, 'template_engine', SQ_PHP_TEMPLATE); $file_list = array('plugins/' . $plugin . '/' . $file => array( - 'PATH' => $file_path, - 'SET_ID' => $template_set_id, - 'ENGINE' => $engine, + 'PATH' => substr($file_path, strlen(SM_PATH)), + 'SET_ID' => $template_set_id, + 'ENGINE' => $engine, ) ); $this->template_file_cache @@ -831,7 +832,7 @@ class Template // if (strpos($file, $filename) === 0 && strpos($file, '/', strlen($filename)) === FALSE) - $return_array[] = $file_info['PATH']; + $return_array[] = SM_PATH . $file_info['PATH']; } return $return_array; @@ -856,7 +857,7 @@ class Template } - return $this->template_file_cache[$filename]['PATH']; + return SM_PATH . $this->template_file_cache[$filename]['PATH']; } @@ -1078,7 +1079,12 @@ class Template } - return $return_array; + + // return sheets for the current template set + // last so we can enable any custom overrides + // of styles in ancestor sheets + // + return array_reverse($return_array); }