Changeset 5766
- Timestamp:
- 03/20/12 18:11:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r5748 r5766 3178 3178 } 3179 3179 3180 function messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd )3180 function messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd,$folder) 3181 3181 { 3182 3182 if ($sort_box_type != "SORTFROM" && $search_box_type!= "FLAGGED"){ … … 3197 3197 if ($offsetEnd > $num_msgs) {$offsetEnd = $num_msgs;} 3198 3198 $slice_array = true; 3199 3199 $from_to_sent = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['from_to_sent']; 3200 3200 for ($i=$num_msgs; $i>0; $i--) 3201 3201 { … … 3221 3221 } 3222 3222 3223 if($sort_box_type=='SORTFROM') { 3224 if ( ($header->from[0]->mailbox . "@" . $header->from[0]->host) == $_SESSION['phpgw_info']['expressomail']['user']['email'])3225 $ from = $header->to;3223 if($sort_box_type=='SORTFROM') { 3224 if (strrpos($folder,'Sent') && $from_to_sent) 3225 $tmp = self::formatMailObject($header->to[0]); 3226 3226 else 3227 $from = $header->from; 3228 if(isset($from[0]->personal)) 3229 $tmp = imap_mime_header_decode($from[0]->personal); 3230 else 3231 $tmp = null; 3232 if (isset($tmp[0]->text)) 3233 $sort[$iuid] = $tmp[0]->text; 3234 else 3235 $sort[$iuid] = $from[0]->mailbox . "@" . $from[0]->host; 3227 $tmp = self::formatMailObject($header->from[0]); 3228 $sort[$iuid] = ($tmp['name']) ? $tmp['name'] : $tmp['email']; 3236 3229 } 3237 3230 else if($sort_box_type=='SORTSUBJECT') { … … 3719 3712 $this->mbox = $this->open_mbox($folder); 3720 3713 3721 return $this->messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd );3714 return $this->messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd,$folder); 3722 3715 } 3723 3716
Note: See TracChangeset
for help on using the changeset viewer.