X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Ftemplate%2FTemplate.class.php;h=b12da29dbe06769272c57e74fed79dfe5fc09c7b;hp=f6718178845a81742c1d9a28a0bf8b53253e6774;hb=3047e291f2982efe9501ec790faafd3da843d22d;hpb=d81572f79656908a290adc913d4e89d5b2cb0a5f diff --git a/class/template/Template.class.php b/class/template/Template.class.php index f6718178..b12da29d 100644 --- a/class/template/Template.class.php +++ b/class/template/Template.class.php @@ -8,7 +8,7 @@ * class with any custom functionality needed to interface a target * templating engine with SquirrelMail. * - * @copyright © 2003-2007 The SquirrelMail Project Team + * @copyright 2003-2012 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -1389,16 +1389,23 @@ FIXME: We could make the incoming array more complex so it can * * @param mixed $headers A list of (or a single) header * text to be sent. + * @param boolean $replace Whether or not to replace header(s) + * previously sent header(s) of the + * same type (this parameter may be + * ignored in some implementations + * of this class if the target interface + * does not support this functionality) + * (OPTIONAL; default = TRUE, always replace). * */ - function header($headers) + function header($headers, $replace=TRUE) { if (!is_array($headers)) $headers = array($headers); foreach ($headers as $header) { $this->assign('header', $header); - header($this->fetch('header.tpl')); + header($this->fetch('header.tpl'), $replace); } } @@ -1473,7 +1480,7 @@ FIXME: We could make the incoming array more complex so it can if (empty($template)) { - trigger_error('The template "' . htmlspecialchars($file) + trigger_error('The template "' . sm_encode_html_special_chars($file) . '" could not be fetched!', E_USER_ERROR); } else {