- Fixed handling of folder with name "0" in folder selector

release-0.6
alecpl 14 years ago
parent 091b0284c8
commit 0deec44e7d

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Fixed handling of folder with name "0" in folder selector
- Fix problems with subfolders of INBOX folder on some IMAP servers (#1487725) - Fix problems with subfolders of INBOX folder on some IMAP servers (#1487725)
- Fix handling of folders that doesn't belong to any namespace (#1487637) - Fix handling of folders that doesn't belong to any namespace (#1487637)
- Fix bug where messages were deleted instead moved to trash folder after Shift key was used (#1487902) - Fix bug where messages were deleted instead moved to trash folder after Shift key was used (#1487902)

@ -1195,7 +1195,7 @@ function rcmail_mailbox_list($attrib)
// add no-selection option // add no-selection option
if ($attrib['noselection']) if ($attrib['noselection'])
$select->add(rcube_label($attrib['noselection']), '0'); $select->add(rcube_label($attrib['noselection']), '');
rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']);
$out = $select->show(); $out = $select->show();
@ -1421,14 +1421,12 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
*/ */
function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0) function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0)
{ {
$idx = 0;
$out = ''; $out = '';
foreach ($arrFolders as $key=>$folder)
{ foreach ($arrFolders as $key=>$folder) {
if (!$realnames && ($folder_class = rcmail_folder_classname($folder['id']))) if (!$realnames && ($folder_class = rcmail_folder_classname($folder['id'])))
$foldername = rcube_label($folder_class); $foldername = rcube_label($folder_class);
else else {
{
$foldername = $folder['name']; $foldername = $folder['name'];
// shorten the folder name to a given length // shorten the folder name to a given length
@ -1440,8 +1438,6 @@ function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength,
if (!empty($folder['folders'])) if (!empty($folder['folders']))
$out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, $select, $realnames, $nestLevel+1); $out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, $select, $realnames, $nestLevel+1);
$idx++;
} }
return $out; return $out;

@ -149,7 +149,7 @@
padding-left: 15px; padding-left: 15px;
} }
#messagetoolbar select.mboxlist option[value="0"] #messagetoolbar select.mboxlist option[value=""]
{ {
padding-left: 2px; padding-left: 2px;
} }

Loading…
Cancel
Save