Changeset 5836 in subversion for branches/devel-framework/roundcubemail
- Timestamp:
- Jan 27, 2012 9:34:32 AM (16 months ago)
- Location:
- branches/devel-framework/roundcubemail/program
- Files:
-
- 1 added
- 5 edited
-
include/rcube_imap.php (modified) (3 diffs)
-
include/rcube_imap_cache.php (modified) (4 diffs)
-
include/rcube_imap_generic.php (modified) (3 diffs)
-
include/rcube_message_header.php (added)
-
include/rcube_storage.php (modified) (3 diffs)
-
steps/mail/func.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/devel-framework/roundcubemail/program/include/rcube_imap.php
r5829 r5836 1044 1044 if ($sort) { 1045 1045 // use this class for message sorting 1046 $sorter = new rcube_ header_sorter();1046 $sorter = new rcube_message_header_sorter(); 1047 1047 $sorter->set_index($msgs); 1048 1048 $sorter->sort_headers($a_msg_headers); … … 1494 1494 * @param bool $force True to skip cache 1495 1495 * 1496 * @return rcube_m ail_header Message headers1496 * @return rcube_message_header Message headers 1497 1497 */ 1498 1498 public function get_message_headers($uid, $folder = null, $force = false) … … 1525 1525 * @param string $folder Folder to read from 1526 1526 * 1527 * @return object rcube_m ail_header Message data1527 * @return object rcube_message_header Message data 1528 1528 */ 1529 1529 public function get_message($uid, $folder = null) -
branches/devel-framework/roundcubemail/program/include/rcube_imap_cache.php
r5829 r5836 288 288 * @param array $msgs Message UIDs 289 289 * 290 * @return array The list of messages (rcube_m ail_header) indexed by UID290 * @return array The list of messages (rcube_message_header) indexed by UID 291 291 */ 292 292 function get_messages($mailbox, $msgs = array()) … … 346 346 * @param bool $no_cache Enables internal cache usage 347 347 * 348 * @return rcube_m ail_header Message data348 * @return rcube_message_header Message data 349 349 */ 350 350 function get_message($mailbox, $uid, $update = true, $cache = true) … … 401 401 * Saves the message in cache. 402 402 * 403 * @param string $mailbox Folder name404 * @param rcube_m ail_header $message Message data405 * @param bool $force Skips message in-cache existance check403 * @param string $mailbox Folder name 404 * @param rcube_message_header $message Message data 405 * @param bool $force Skips message in-cache existance check 406 406 */ 407 407 function add_message($mailbox, $message, $force = false) … … 1037 1037 * @param array $sql_arr Message row data 1038 1038 * 1039 * @return rcube_m ail_header Message object1039 * @return rcube_message_header Message object 1040 1040 */ 1041 1041 private function build_message($sql_arr) -
branches/devel-framework/roundcubemail/program/include/rcube_imap_generic.php
r5834 r5836 27 27 */ 28 28 29 /** 30 * Struct representing an e-mail message header 31 * 32 * @package Mail 33 * @author Aleksander Machniak <alec@alec.pl> 34 */ 35 class rcube_mail_header 36 { 37 public $id; 38 public $uid; 39 public $subject; 40 public $from; 41 public $to; 42 public $cc; 43 public $replyto; 44 public $in_reply_to; 45 public $date; 46 public $messageID; 47 public $size; 48 public $encoding; 49 public $charset; 50 public $ctype; 51 public $timestamp; 52 public $bodystructure; 53 public $internaldate; 54 public $references; 55 public $priority; 56 public $mdn_to; 57 public $others = array(); 58 public $flags = array(); 59 } 29 // for backward copat. 30 class rcube_mail_header extends rcube_message_header { } 60 31 61 32 … … 2011 1982 * @param bool $vanished Enables VANISHED parameter (RFC5162) for CHANGEDSINCE query 2012 1983 * 2013 * @return array List of rcube_m ail_header elements, False on error1984 * @return array List of rcube_message_header elements, False on error 2014 1985 * @since 0.6 2015 1986 */ … … 2051 2022 $id = intval($m[1]); 2052 2023 2053 $result[$id] = new rcube_m ail_header;2024 $result[$id] = new rcube_message_header; 2054 2025 $result[$id]->id = $id; 2055 2026 $result[$id]->subject = ''; -
branches/devel-framework/roundcubemail/program/include/rcube_storage.php
r5835 r5836 424 424 * @param string $folder Folder to read from 425 425 * 426 * @return object rcube_m ail_header Message data426 * @return object rcube_message_header Message data 427 427 */ 428 428 abstract function get_message($uid, $folder = null); … … 436 436 * @param bool $force True to skip cache 437 437 * 438 * @return rcube_m ail_header Message headers438 * @return rcube_message_header Message headers 439 439 */ 440 440 abstract function get_message_headers($uid, $folder = null, $force = false); … … 969 969 abstract function get_cache($key); 970 970 971 } // end class rcube_storage972 973 974 /**975 * Class for sorting an array of rcube_mail_header objects in a predetermined order.976 *977 * @package Mail978 * @author Eric Stadtherr979 */980 class rcube_header_sorter981 {982 private $uids = array();983 984 985 /**986 * Set the predetermined sort order.987 *988 * @param array $index Numerically indexed array of IMAP UIDs989 */990 function set_index($index)991 {992 $index = array_flip($index);993 994 $this->uids = $index;995 }996 997 /**998 * Sort the array of header objects999 *1000 * @param array $headers Array of rcube_mail_header objects indexed by UID1001 */1002 function sort_headers(&$headers)1003 {1004 uksort($headers, array($this, "compare_uids"));1005 }1006 1007 /**1008 * Sort method called by uksort()1009 *1010 * @param int $a Array key (UID)1011 * @param int $b Array key (UID)1012 */1013 function compare_uids($a, $b)1014 {1015 // then find each sequence number in my ordered list1016 $posa = isset($this->uids[$a]) ? intval($this->uids[$a]) : -1;1017 $posb = isset($this->uids[$b]) ? intval($this->uids[$b]) : -1;1018 1019 // return the relative position as the comparison value1020 return $posa - $posb;1021 }1022 971 } -
branches/devel-framework/roundcubemail/program/steps/mail/func.inc
r5759 r5836 226 226 $a_show_cols = array_unique($a_show_cols); 227 227 228 // Plugins may set header's list_cols/list_flags and other rcube_m ail_header variables228 // Plugins may set header's list_cols/list_flags and other rcube_message_header variables 229 229 // and list columns 230 230 $plugin = $RCMAIL->plugins->exec_hook('messages_list',
Note: See TracChangeset
for help on using the changeset viewer.
