Move always included vars to init.php because it is confusing when not logged in.
[squirrelmail.git] / include / init.php
index 0e00ac2477fe8d9d2d00f994692cb7e92b91f9a6..9ec05a318219ccdaefdeca7d4eefc83cb7035193 100644 (file)
@@ -509,6 +509,12 @@ if (!isset($sTplDir)) {
 }
 $oTemplate = new Template($sTplDir);
 
 }
 $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
  */
 /**
  * Initialize our custom error handler object
  */