X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Fdefault%2Fleft_main.tpl;h=6d9169c78c859ed63b12d9f0867ddad623c2ad67;hp=106bc236ff11e401c4eab18b2043fb5a6f59d125;hb=e883b46ee74c1f2d5ea382bded08a3e728cc47d5;hpb=535ca3710b87c6ea9bd1f5fc63390df7658c6d90 diff --git a/templates/default/left_main.tpl b/templates/default/left_main.tpl index 106bc236..6d9169c7 100644 --- a/templates/default/left_main.tpl +++ b/templates/default/left_main.tpl @@ -8,10 +8,8 @@ * $clock - formatted string containing last refresh * $settings - Array containing user perferences needed by this * template. Indexes are as follows: - * $settings['iconThemePath'] - Path to the desired icon theme. If - * the user has disabled icons, this will be NULL. - * $settings['templateDirectory'] - contains the path to the current - * template directory. This may be needed by third + * $settings['templateID'] - contains the ID of the current + * template set. This may be needed by third * party packages that don't integrate easily. * $settings['unreadNotificationEnabled'] - Boolean TRUE if the user * wants to see unread message count on mailboxes @@ -71,15 +69,13 @@ * @author Steve Brown */ -/** include required files */ -include_once(SM_PATH . 'templates/util_global.php'); /* * Recursively parse the mailbox structure to build the navigation tree. * * @since 1.5.2 */ -function buildMailboxTree ($box, $settings, $indent_factor=0) { +function buildMailboxTree ($box, $settings, $icon_theme_path, $indent_factor=0) { // stop condition if (empty($box)) { return ''; @@ -141,25 +137,25 @@ function buildMailboxTree ($box, $settings, $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($settings['iconThemePath'], 'inbox.png', '', $box['MailboxName']); + $folder_icon = getIcon($icon_theme_path, 'inbox.png', '', $box['MailboxName']); break; case $box['IsSent']: - $folder_icon = getIcon($settings['iconThemePath'], 'senti.png', '', $box['MailboxName']); + $folder_icon = getIcon($icon_theme_path, 'senti.png', '', $box['MailboxName']); break; case $box['IsTrash']: - $folder_icon = getIcon($settings['iconThemePath'], 'delitem.png', '', $box['MailboxName']); + $folder_icon = getIcon($icon_theme_path, 'delitem.png', '', $box['MailboxName']); break; case $box['IsDraft']: - $folder_icon = getIcon($settings['iconThemePath'], 'draft.png', '', $box['MailboxName']); + $folder_icon = getIcon($icon_theme_path, 'draft.png', '', $box['MailboxName']); break; case $box['IsNoInferiors']: - $folder_icon = getIcon($settings['iconThemePath'], 'folder_noinf.png', '', $box['MailboxName']); + $folder_icon = getIcon($icon_theme_path, 'folder_noinf.png', '', $box['MailboxName']); break; default: - $folder_icon = getIcon($settings['iconThemePath'], 'folder.png', '', $box['MailboxName']); + $folder_icon = getIcon($icon_theme_path, 'folder.png', '', $box['MailboxName']); break; } $folder_icon .= ' '; @@ -213,6 +209,11 @@ function buildMailboxTree ($box, $settings, $indent_factor=0) { } } + // Add any extra output that may have been added by plugins, etc + // + if (!empty($box['ExtraOutput'])) + $end .= $box['ExtraOutput']; + $span = ''; $spanend = ''; if ($settings['useSpecialFolderColor'] && $box['IsSpecial']) { @@ -223,18 +224,6 @@ function buildMailboxTree ($box, $settings, $indent_factor=0) { $spanend = ''; } -/******** - * Pulling imapConnection due to segfaults that cannot be tracked down. Best - * we can determine,its some combination of this var and >= 4 plugins enabled. - * No further clue from anyone. - ******** - - // let plugins fiddle with end of line - $end .= concat_hook_function('left_main_after_each_folder', - array(isset($numMessages) ? $numMessages : '', - $box['MailboxFullName'], $settings['imapConnection'])); -*/ - $end .= ''; $out = ''; @@ -250,7 +239,7 @@ function buildMailboxTree ($box, $settings, $indent_factor=0) { if (!$box['IsCollapsed'] || $box['IsRoot']) { for ($i = 0; $i
- +
@@ -277,9 +266,9 @@ extract($t);

- + - +