separate multiple addresses with ",", put as much on a line
[squirrelmail.git] / templates / default / left_main.tpl
index 92e903034c950d89c853f09c85195b603a45bc81..27fada32e99638b8a2c02ae5363c503a25cf0d49 100644 (file)
@@ -69,8 +69,6 @@
  * @author Steve Brown
  */
 
-/** include required files */
-include_once(SM_PATH . 'templates/util_global.php');
 
 /*
  * Recursively parse the mailbox structure to build the navigation tree.
@@ -139,7 +137,7 @@ function buildMailboxTree ($box, $settings, $icon_theme_path, $indent_factor=0)
      * image based on whatever logic they see fit here.
      */
     $folder_icon = '';
-    if (!is_null($settings['iconThemePath'])) {
+    if (!is_null($icon_theme_path)) {
         switch (true) {
             case $box['IsInbox']:
                 $folder_icon = getIcon($icon_theme_path, 'inbox.png', '', $box['MailboxName']);
@@ -223,14 +221,18 @@ function buildMailboxTree ($box, $settings, $icon_theme_path, $indent_factor=0)
 
 /********
  * Pulling imapConnection due to segfaults that cannot be tracked down.  Best
- * we can determine,its some combination of this var and >= 4 plugins enabled.
+ * we can determine, it's some combination of this var and >= 4 plugins enabled.
  * No further clue from anyone.
+ ********
+ * Update: syntax of this hook call changed a bit, so if the error is so anomalous,
+ * it might be worth trying this again to see if it is still segfaulting
  ********
     
     // let plugins fiddle with end of line
+// FIXME: no hooks in templates! Although note that I'm not sure we can avoid it here because the context of which folder we are displaying is important to the hook, unless we preemptively iterate through all folders and collect the output from the hook call for that and give that to the template.... seems like overkill; I say this hook remains
     $end .= concat_hook_function('left_main_after_each_folder',
-            array(isset($numMessages) ? $numMessages : '',
-            $box['MailboxFullName'], $settings['imapConnection']));
+            $temp=array(isset($numMessages) ? &$numMessages : '',
+            &$box['MailboxFullName'], &$settings['imapConnection']));
 */
 
     $end .= '</span>';
@@ -248,7 +250,7 @@ function buildMailboxTree ($box, $settings, $icon_theme_path, $indent_factor=0)
 
     if (!$box['IsCollapsed'] || $box['IsRoot']) {
         for ($i = 0; $i<sizeof($box['ChildBoxes']); $i++) {
-            $out .= buildMailboxTree($box['ChildBoxes'][$i], $settings, $indent_factor);
+            $out .= buildMailboxTree($box['ChildBoxes'][$i], $settings, $icon_theme_path, $indent_factor);
         }
     }
 
@@ -261,7 +263,7 @@ extract($t);
 ?>
 <body class="sqm_leftMain">
 <div class="sqm_leftMain">
-<?php do_hook('left_main_before'); ?>
+<?php if (!empty($plugin_output['left_main_before'])) echo $plugin_output['left_main_before']; ?>
 <table class="sqm_wrapperTable" cellspacing="0">
  <tr>
   <td>
@@ -279,5 +281,5 @@ extract($t);
   </td>
  </tr>
 </table>
-<?php do_hook('left_main_after'); ?>
+<?php if (!empty($plugin_output['left_main_after'])) echo $plugin_output['left_main_after']; ?>
 </div>