Changeset 2253 in subversion
- Timestamp:
- Jan 22, 2009 9:49:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap.php
r2251 r2253 1505 1505 * @param mixed Message UIDs as array or as comma-separated string 1506 1506 * @param string Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT 1507 * @param boolean Simulate flagging (don't set flag on IMAP server)1508 1507 * @return boolean True on success, False on failure 1509 1508 */ 1510 function set_flag($uids, $flag , $fake=false)1509 function set_flag($uids, $flag) 1511 1510 { 1512 1511 $flag = strtoupper($flag); … … 1515 1514 $uids = explode(',',$uids); 1516 1515 1517 if (!$fake || $this->caching_enabled) 1518 foreach ($uids as $uid) { 1519 $msg_ids[$uid] = $this->_uid2id($uid); 1520 } 1521 1522 if (!$fake) { 1523 if ($flag=='UNDELETED') 1524 $result = iil_C_Undelete($this->conn, $this->mailbox, join(',', array_values($msg_ids))); 1525 else if ($flag=='UNSEEN') 1526 $result = iil_C_Unseen($this->conn, $this->mailbox, join(',', array_values($msg_ids))); 1527 else if ($flag=='UNFLAGGED') 1528 $result = iil_C_UnFlag($this->conn, $this->mailbox, join(',', array_values($msg_ids)), 'FLAGGED'); 1529 else 1530 $result = iil_C_Flag($this->conn, $this->mailbox, join(',', array_values($msg_ids)), $flag); 1531 } 1532 1516 foreach ($uids as $uid) { 1517 $msg_ids[$uid] = $this->_uid2id($uid); 1518 } 1519 1520 if ($flag=='UNDELETED') 1521 $result = iil_C_Undelete($this->conn, $this->mailbox, join(',', array_values($msg_ids))); 1522 else if ($flag=='UNSEEN') 1523 $result = iil_C_Unseen($this->conn, $this->mailbox, join(',', array_values($msg_ids))); 1524 else if ($flag=='UNFLAGGED') 1525 $result = iil_C_UnFlag($this->conn, $this->mailbox, join(',', array_values($msg_ids)), 'FLAGGED'); 1526 else 1527 $result = iil_C_Flag($this->conn, $this->mailbox, join(',', array_values($msg_ids)), $flag); 1528 1533 1529 // reload message headers if cached 1534 if ($this->caching_enabled) { 1535 $cache_key = $this->mailbox.'.msg'; 1536 foreach ($msg_ids as $uid => $id) { 1530 $cache_key = $this->mailbox.'.msg'; 1531 if ($this->caching_enabled) 1532 { 1533 foreach ($msg_ids as $uid => $id) 1534 { 1537 1535 if ($cached_headers = $this->get_cached_message($cache_key, $uid)) 1538 1536 { … … 1548 1546 1549 1547 // set nr of messages that were flaged 1550 $count = count($ uids);1548 $count = count($msg_ids); 1551 1549 1552 1550 // clear message count cache … … 2941 2939 2942 2940 if (empty($result[$key]['name'])) 2943 $result[$key]['name'] = $result[$key]['address']; 2944 elseif (empty($result[$key]['address'])) 2945 $result[$key]['address'] = $result[$key]['name']; 2941 $result[$key]['name'] = $result[$key]['address']; 2942 elseif (empty($result[$key]['address'])) 2943 $result[$key]['address'] = $result[$key]['name']; 2946 2944 } 2947 2945
Note: See TracChangeset
for help on using the changeset viewer.
