Changeset 283 in subversion
- Timestamp:
- Jul 27, 2006 5:08:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap.inc
r277 r283 500 500 $max = $this->_messagecount($mailbox); 501 501 $start_msg = ($this->list_page-1) * $this->page_size; 502 502 503 503 list($begin, $end) = $this->_get_message_range($max, $page); 504 504 505 505 // mailbox is empty 506 506 if ($begin >= $end) 507 507 return array(); 508 509 //console("fetch headers $start_msg to ".($start_msg+$this->page_size)." (msg $begin to $end)");510 508 511 509 $headers_sorted = FALSE; … … 513 511 $cache_status = $this->check_cache_status($mailbox, $cache_key); 514 512 515 //console("Cache status = $cache_status");516 517 513 // cache is OK, we can get all messages from local cache 518 514 if ($cache_status>0) … … 526 522 if ($this->get_capability('sort') && ($msg_index = iil_C_Sort($this->conn, $mailbox, $this->sort_field, $this->skip_deleted ? 'UNDELETED' : ''))) 527 523 { 528 //console("$mailbox: ".join(',', $msg_index));529 530 524 $msgs = $msg_index[$begin]; 531 525 for ($i=$begin+1; $i < $end; $i++) 532 526 $msgs = $msgs.','.$msg_index[$i]; 533 534 $sorted = TRUE;535 527 } 536 528 else 537 529 { 538 530 $msgs = sprintf("%d:%d", $begin+1, $end); 539 $sorted = FALSE;540 531 } 541 532 … … 548 539 } 549 540 550 541 551 542 // fetch reuested headers from server 552 543 $a_msg_headers = array(); … … 556 547 $this->clear_message_cache($cache_key, $max); 557 548 558 549 559 550 // kick child process to sync cache 560 551 // ... 561 552 562 553 } 563 554 … … 569 560 570 561 // if not already sorted 571 //if (!$headers_sorted)572 //$a_msg_headers = iil_SortHeaders($a_msg_headers, $this->sort_field, $this->sort_order);573 574 575 if (!$headers_sorted && $this->sort_order == 'DESC')576 $a_msg_headers = array_reverse($a_msg_headers);577 562 if (!$headers_sorted) 563 $a_msg_headers = iil_SortHeaders($a_msg_headers, $this->sort_field, $this->sort_order); 564 565 566 if (!$headers_sorted && $this->sort_order == 'DESC') 567 $a_msg_headers = array_reverse($a_msg_headers); 568 578 569 579 570 return array_values($a_msg_headers);
Note: See TracChangeset
for help on using the changeset viewer.
