X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=templates%2Fdefault_advanced%2Fleft_main.tpl;h=c8bad7aba28b3455425ae4d0fa5a529ba9a3e4f8;hb=be13be85fc4f4b22980125eb28ddfde0190e0622;hp=5f74ac5747c4fc3ec27a544aecfdd6708d8c6345;hpb=a9527551fc4be07a5e2974e3fa8ab691415be1d1;p=squirrelmail.git diff --git a/templates/default_advanced/left_main.tpl b/templates/default_advanced/left_main.tpl index 5f74ac57..c8bad7ab 100644 --- a/templates/default_advanced/left_main.tpl +++ b/templates/default_advanced/left_main.tpl @@ -12,12 +12,10 @@ * $clock - formatted string containing last refresh * $settings - Array containing user perferences needed by this * template. Indexes are as follows: - * $settings['imapConnection'] - IMAP connection handle. Needed to - * allow plugins to read the mailbox. * $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 @@ -77,19 +75,18 @@ * @author Steve Brown */ -/** include required files */ -include_once(SM_PATH . 'templates/util_global.php'); /* * Recursively parse the mailbox structure to build the navigation tree. * * @param array $box Array containing mailbox data * @param array $settings Array containing perferences, etc, passed to template + * @param string $icon_theme_path * @param integer $indent_factor Counter used to control indent spacing * @since 1.5.2 * @author Steve Brown */ -function buildMailboxTree ($box, $settings, $parent_node=-1) { +function buildMailboxTree ($box, $settings, $icon_theme_path, $parent_node=-1) { static $counter; // stop condition @@ -97,11 +94,10 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { return ''; } - $image_path = $settings['templateDirectory'] . 'images/'; $out = ''; - if ($box['IsRoot']) { + if ($box['IsRoot']) { // Determine the path to the correct images - $out .= 'mailboxes = new dTree("mailboxes", "'.$image_path.'");'."\n"; + $out .= 'mailboxes = new dTree("mailboxes", "'.$icon_theme_path.'");'."\n"; $out .= 'mailboxes.config.inOrder = true;'."\n"; $counter = -1; } else { @@ -147,21 +143,21 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { $img_open = ''; switch (true) { case $box['IsInbox']: - $img = $image_path . 'base.png'; - $img_open = $image_path . 'base.png'; + $img = 'base.png'; + $img_open = 'base.png'; break; case $box['IsTrash']: - $img = $image_path . 'trash.png'; - $img_open = $image_path . 'trash.png'; + $img = 'trash.png'; + $img_open = 'trash.png'; break; case $box['IsNoSelect']: case $box['IsNoInferiors']: - $img = $image_path . 'page.png'; - $img_open = $image_path . 'page.png'; + $img = 'page.png'; + $img_open = 'page.png'; break; default: - $img = $image_path . 'folder.png'; - $img_open = $image_path . 'folderopen.png'; + $img = 'folder.png'; + $img_open = 'folderopen.png'; break; } @@ -233,15 +229,15 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { $out .= 'mailboxes.add('.$counter.', '.$parent_node.', ' . '"'.addslashes($name).'", "'.$url.'", "'.$title.'", ' . '"'.$target.'", ' . - '"'.$img.'", ' . - '"'.$img_open.'"' . + '"'.getIconPath($icon_theme_path, $img).'", ' . + '"'.getIconPath($icon_theme_path, $img_open).'"' . ');'."\n"; } } $parent_node = $counter; for ($i = 0; $i
- +
@@ -306,9 +302,9 @@ if ($settings['messageRecyclingEnabled']) {

- - \ No newline at end of file + +