'; $end = ''; $indent = str_repeat('  ',$indent_factor); // Get unseeen/total message info if needed $unseen_str = ''; if ($settings['unreadNotificationEnabled']) { // We only display the unread count if we on the Inbox or we are told // to display it on all folders AND there is more than 1 unread message if ( $settings['unreadNotificationAllFolders'] || (!$settings['unreadNotificationAllFolders'] && strtolower($box['MailboxFullName'])=='inbox') ) { $unseen = $settings['unreadNotificationCummulative'] ? $box['CummulativeUnreadCount'] : $box['UnreadCount']; if (!$box['IsNoSelect'] && ($unseen > 0 || $settings['unreadNotificationDisplayTotal'])) { $unseen_str = $unseen; // Add the total messages if desired if ($settings['unreadNotificationDisplayTotal']) { $unseen_str .= '/' . ($settings['unreadNotificationCummulative'] ? $box['CummulativeMessageCount'] : $box['MessageCount']); } $unseen_str = '' . $unseen_str . ''; } } } /* * If the box has any children, and collapsable folders have been enabled * we need to output the expand/collapse link. */ if (sizeof($box['ChildBoxes'])>0 && $settings['collapsableFoldersEnabled']) { $link = $indent . '' . $box['CollapseLink']['Icon'] . ''; $pre .= $link; } else { $pre .= $indent . '  '; } /** * Add folder icon. Template authors may choose to display a different * image based on whatever logic they see fit here. */ $folder_icon = ''; if (!is_null($icon_theme_path)) { switch (true) { case $box['IsInbox']: $folder_icon = getIcon($icon_theme_path, 'inbox.png', '', $box['MailboxName']); break; case $box['IsSent']: $folder_icon = getIcon($icon_theme_path, 'senti.png', '', $box['MailboxName']); break; case $box['IsTrash']: $folder_icon = getIcon($icon_theme_path, 'delitem.png', '', $box['MailboxName']); break; case $box['IsDraft']: $folder_icon = getIcon($icon_theme_path, 'draft.png', '', $box['MailboxName']); break; case $box['IsNoInferiors']: $folder_icon = getIcon($icon_theme_path, 'folder_noinf.png', '', $box['MailboxName']); break; default: $folder_icon = getIcon($icon_theme_path, 'folder.png', '', $box['MailboxName']); break; } $folder_icon .= ' '; } $pre .= $folder_icon; /* * The Trash folder should only be displayed if message recycling has * been enabled, i.e. when deleted is a message moved to the trash or * deleted forever? */ $view_link = ''; if ($settings['messageRecyclingEnabled'] && $box['IsTrash']) { $pre .= $view_link; // Boxes with unread messages should be emphasized if ($box['UnreadCount'] > 0) { $pre .= ''; $end .= ''; } $end .= ''; // Print unread info if ($box['MessageCount'] > 0 || count($box['ChildBoxes'])) { if (!empty($unseen_str)) { $end .= ' ('.$unseen_str.')'; } $end .= "\n" . '  ['. _("Purge").']' . ''; } } else { // Add a few other things for all other folders... if (!$box['IsNoSelect']) { $pre .= $view_link; // Boxes with unread messages should be emphasized if ($box['UnreadCount'] > 0) { $pre .= ''; $end .= ''; } $end .= ''; } // Display unread info... if (!empty($unseen_str)) { $end .= ' ('.$unseen_str.')'; } } $span = ''; $spanend = ''; if ($settings['useSpecialFolderColor'] && $box['IsSpecial']) { $span = ''; $spanend = ''; } elseif ( $box['IsNoSelect'] ) { $span = ''; $spanend = ''; } /******** * Pulling imapConnection due to segfaults that cannot be tracked down. Best * 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', $temp=array(isset($numMessages) ? &$numMessages : '', &$box['MailboxFullName'], &$settings['imapConnection'])); */ $end .= ''; $out = ''; if (!$box['IsRoot']) { $out = $span . $pre . str_replace( array(' ','<','>'), array(' ','<','>'), $box['MailboxName']) . $end . $spanend . '
' . "\n"; $indent_factor++; } if (!$box['IsCollapsed'] || $box['IsRoot']) { for ($i = 0; $i

[]