X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fmailbox_display.php;h=6e93c81ec2ac3ed07dbeaa976740033140bcc3a4;hp=b4b8b54641a199301a516320a255d9129d4ddc59;hb=6395c46db0a732860324fa43886b6ca806ad2588;hpb=551a09c71761b7ed9ea03c0f01a4f22b53811de1 diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index b4b8b546..6e93c81e 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -58,7 +58,9 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox, $allow_server_sort, /* enable/disable server-side sorting */ $truncate_sender, /* number of characters for From/To field (<= 0 for unchanged) */ $email_address, - $show_recipient_instead; /* show recipient name instead of default identity */ + $show_recipient_instead, /* show recipient name instead of default identity */ + $use_icons, /* indicates to use icons or text markers */ + $icon_theme; /* icons theming */ $color_string = $color[4]; @@ -274,41 +276,102 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox, echo html_tag( 'td', $td_str, 'left', $hlt_color ); break; case 5: /* flags */ - $stuff = false; - $td_str = ""; - if (isset($msg['FLAG_ANSWERED']) && $msg['FLAG_ANSWERED'] == true) { - $td_str .= _("A"); - $stuff = true; - } - if ($msg['TYPE0'] == 'multipart') { - $td_str .= '+'; - $stuff = true; + // icon message markers + // + if ($use_icons && $icon_theme != 'none') { + $td_str = ""; + if (isset($msg['FLAG_FLAGGED']) && $msg['FLAG_FLAGGED'] == true) { + $td_str .= _(' '); + } + if ($default_use_priority) { + if ( ($msg['PRIORITY'] == 1) || ($msg['PRIORITY'] == 2) ) { + $td_str .= ' '; + } + else if ($msg['PRIORITY'] == 5) { + $td_str .= ' '; + } + else + { + $td_str .= ' '; + } + } + if ($msg['TYPE0'] == 'multipart') { + $td_str .= ''; + } + else + { + $td_str .= ''; + } + + $msg_icon = ''; + if (!isset($msg['FLAG_SEEN']) || ($msg['FLAG_SEEN']) == false) + { + $msg_alt = '(' . _("New") . ')'; + $msg_title = '(' . _("New") . ')'; + $msg_icon .= SM_PATH . 'images/themes/' . $icon_theme . '/msg_new'; + } + else + { + $msg_alt = '(' . _("Read") . ')'; + $msg_title = '(' . _("Read") . ')'; + $msg_icon .= SM_PATH . 'images/themes/' . $icon_theme . '/msg_read'; + } + if (isset($msg['FLAG_DELETED']) && ($msg['FLAG_DELETED']) == true) + { + $msg_icon .= '_deleted'; + } + if (isset($msg['FLAG_ANSWERED']) && ($msg['FLAG_ANSWERED']) == true) + { + $msg_icon .= '_reply'; + } + $td_str .= ''. $msg_alt . ''; + $td_str .= ''; + echo html_tag( 'td', + $td_str, + 'right', + $hlt_color, + 'nowrap' ); } - if ($default_use_priority) { - if ( ($msg['PRIORITY'] == 1) || ($msg['PRIORITY'] == 2) ) { - $td_str .= "!"; + + + // plain text message markers + // + else { + $stuff = false; + $td_str = ""; + if (isset($msg['FLAG_ANSWERED']) && $msg['FLAG_ANSWERED'] == true) { + $td_str .= _("A"); $stuff = true; } - if ($msg['PRIORITY'] == 5) { - $td_str .= "?"; + if ($msg['TYPE0'] == 'multipart') { + $td_str .= '+'; $stuff = true; } + if ($default_use_priority) { + if ( ($msg['PRIORITY'] == 1) || ($msg['PRIORITY'] == 2) ) { + $td_str .= "!"; + $stuff = true; + } + if ($msg['PRIORITY'] == 5) { + $td_str .= "?"; + $stuff = true; + } + } + if (isset($msg['FLAG_DELETED']) && $msg['FLAG_DELETED'] == true) { + $td_str .= "D"; + $stuff = true; + } + if (!$stuff) { + $td_str .= ' '; + } + $td_str .= ''; + echo html_tag( 'td', + $td_str, + 'center', + $hlt_color, + 'nowrap' ); } - if (isset($msg['FLAG_DELETED']) && $msg['FLAG_DELETED'] == true) { - $td_str .= "D"; - $stuff = true; - } - if (!$stuff) { - $td_str .= ' '; - } - do_hook("msg_envelope"); - $td_str .= ''; - echo html_tag( 'td', - $td_str, - 'center', - $hlt_color, - 'nowrap' ); break; case 6: /* size */ echo html_tag( 'td',