From: stevetruckstuff Date: Fri, 18 Aug 2006 20:17:43 +0000 (+0000) Subject: Some variables are needed by all templates to make creation easier. Make sure they... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=047dd3e8885cf4d876ed0d6d59b547dc6d042e3d Some variables are needed by all templates to make creation easier. Make sure they are passed as variables to the template. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11611 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/template/template.class.php b/class/template/template.class.php index 238b8ac1..238d0d13 100755 --- a/class/template/template.class.php +++ b/class/template/template.class.php @@ -203,6 +203,17 @@ class Template */ function display($file) { + /** + * We want to make sure that certain variables are always passed to the + * templates b/c they are critical to certain template functions. + */ + $always_include = array('icon_theme_path', 'sTplDir'); + foreach ($always_include as $var) { + if (!isset($this->values[$var]) && isset($GLOBALS[$var])) { + $this->assign($var, $GLOBALS[$var]); + } + } + // Pull in our config file $t = &$this->values; // place values array directly in scope