From 7ca9685a9fdc22d572f092257f8411906dfa5122 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Tue, 9 Jan 2007 08:03:54 +0000 Subject: [PATCH] Allow template sets to filter or completely change header delivery git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12108 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/template/Template.class.php | 5 +++-- templates/default/header.tpl | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 templates/default/header.tpl diff --git a/class/template/Template.class.php b/class/template/Template.class.php index c43e04ae..df6cc7a8 100644 --- a/class/template/Template.class.php +++ b/class/template/Template.class.php @@ -1316,7 +1316,7 @@ FIXME: We could make the incoming array more complex so it can * Send HTTP header(s) to browser. * * Subclasses can override this function if headers are - * managed differently in the template set's target output + * managed differently in the engine's target output * interface. * * @param mixed $headers A list of (or a single) header @@ -1329,7 +1329,8 @@ FIXME: We could make the incoming array more complex so it can if (!is_array($headers)) $headers = array($headers); foreach ($headers as $header) { - header($header); + $this->assign('header', $header); + header($this->fetch('header.tpl')); } } diff --git a/templates/default/header.tpl b/templates/default/header.tpl new file mode 100644 index 00000000..45b1d059 --- /dev/null +++ b/templates/default/header.tpl @@ -0,0 +1,26 @@ +