Some variables are needed by all templates to make creation easier. Make sure they...
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 18 Aug 2006 20:17:43 +0000 (20:17 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 18 Aug 2006 20:17:43 +0000 (20:17 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11611 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/template/template.class.php

index 238b8ac..238d0d1 100755 (executable)
@@ -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