alecpl
2010-10-17 4438d667609406abd969872f262d6a11b0e28b72
program/steps/mail/func.inc
@@ -255,17 +255,14 @@
  if (empty($a_headers))
    return;
  // remove 'threads', 'attachment', 'flag' columns, we don't need them here
  if (($key = array_search('attachment', $a_show_cols)) !== FALSE)
  // remove 'threads', 'attachment', 'flag', 'status' columns, we don't need them here
  foreach (array('threads', 'attachment', 'flag', 'status') as $col) {
    if (($key = array_search($col, $a_show_cols)) !== FALSE)
    unset($a_show_cols[$key]);
  if (($key = array_search('flag', $a_show_cols)) !== FALSE)
    unset($a_show_cols[$key]);
  if (($key = array_search('threads', $a_show_cols)) !== FALSE)
    unset($a_show_cols[$key]);
  // loop through message headers
  }
  foreach ($a_headers as $n => $header)
    {
  // loop through message headers
  foreach ($a_headers as $n => $header) {
    if (empty($header))
      continue;
@@ -275,12 +272,10 @@
    $IMAP->set_charset(!empty($header->charset) ? $header->charset : $CONFIG['default_charset']);
    // format each col; similar as in rcmail_message_list()
    foreach ($a_show_cols as $col)
      {
    foreach ($a_show_cols as $col) {
      if (in_array($col, array('from', 'to', 'cc', 'replyto')))
        $cont = Q(rcmail_address_string($header->$col, 3), 'show');
      else if ($col=='subject')
        {
      else if ($col=='subject') {
        $cont = abbreviate_string(trim($IMAP->decode_header($header->$col)), 160);
        if (!$cont) $cont = rcube_label('nosubject');
        $cont = Q($cont);
@@ -380,7 +375,8 @@
        $col_name = '<span class="flagged">&nbsp;</span>';
        break;
      case 'attachment':
        $col_name = '<span class="attachment">&nbsp;</span>';
      case 'status':
        $col_name = '<span class="' . $col .'">&nbsp;</span>';
        break;
      case 'threads':
        $col_name = $list_menu;