git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11614
7612ce4b-ef26-0410-bec9-
ea0150e637f0
*/
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
}
$oTemplate = new Template($sTplDir);
+// We want some variables to always be available to the template
+$always_include = array('sTplDir', 'icon_theme_path');
+foreach ($always_include as $var) {
+ $oTemplate->assign($var, (isset($$var) ? $$var : NULL));
+}
+
/**
* Initialize our custom error handler object
*/