alecpl
2010-05-30 6c9d496fcc44a1d36299fb1d107d49e53858104c
program/steps/mail/func.inc
@@ -171,6 +171,10 @@
      && (($f = array_search('from', $a_show_cols)) !== false) && array_search('to', $a_show_cols) === false)
    $a_show_cols[$f] = 'to';
  // make sure 'threads' column is present
  if (!in_array('threads', $a_show_cols))
    array_unshift($a_show_cols, 'threads');
  $skin_path = $_SESSION['skin_path'] = $CONFIG['skin_path'];
  // set client env
@@ -238,6 +242,10 @@
      && (($f = array_search('from', $a_show_cols)) !== false) && array_search('to', $a_show_cols) === false)
    $a_show_cols[$f] = 'to';
  // make sure 'threads' column is present
  if (!in_array('threads', $a_show_cols))
    array_unshift($a_show_cols, 'threads');
  $thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : NULL;
  $OUTPUT->command('set_message_coltypes', $a_show_cols, $thead);
@@ -245,10 +253,12 @@
  if (empty($a_headers))
    return;
  // remove 'attachment' and 'flag' columns, we don't need them here
  if(($key = array_search('attachment', $a_show_cols)) !== FALSE)
  // remove 'threads', 'attachment', 'flag' columns, we don't need them here
  if (($key = array_search('attachment', $a_show_cols)) !== FALSE)
    unset($a_show_cols[$key]);
  if(($key = array_search('flag', $a_show_cols)) !== FALSE)
  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
@@ -345,7 +355,7 @@
  else
    $list_menu = '';
  $cells = array(array('className' => 'threads', 'html' => $list_menu));
  $cells = array();
  foreach ($a_show_cols as $col) {
    // get column name
@@ -356,6 +366,9 @@
      case 'attachment':
        $col_name = sprintf($image_tag, $skin_path, $attrib['attachmenticon'], '');
        break;
      case 'threads':
        $col_name = $list_menu;
        break;
      default:
        $col_name = Q(rcube_label($col));
    }