_sear


Hi Developers,

  RoundCube mail is one good product to work with.

  Recently We installed it in our servers and we changed the the mail list fields order.

  By default it was [subject, sender, date, size]... We changed it to [Sender, subject, date, size]

 

  Here the 'sender' field will be changed to 'recipients' or 'to' when you go to 'SENT' or 'DRAFT' folders, But After Changing the order as specified, it wont get changed.

  When Analysed it i found that the array_search('from') returning '0' which makes the if condition falls (not to change the field).

  Here is the code replacement for the above bug in program/steps/mail/func.inc

 

  The  change comes in two functions

        nowpos_message_list($attrib)

         nowpos_js_message_list($attrib)
 

 //------------------------------------------------

  // show 'to' instead of from in sent messages
  if ($IMAP->get_mailbox_name()==$CONFIG['sent_mbox'] || $IMAP->get_mailbox_name()==$CONFIG['drafts_mbox']) {
     $f = array_search('from', $a_show_cols);
loglater($f);
     if ($f === false) {
       // do nothing
     }
     else if ($f >= 0) {
      if ( array_search('to', $a_show_cols) === false) {
         $a_show_cols[$f] = 'to';
      }
     }
  }

//-------------------------------------------------------
 

  
 

  Please fix it in next releases 

 

 

--
-Sreeni.A