Changeset 3446 in subversion
- Timestamp:
- Mar 31, 2010 3:14:32 AM (3 years ago)
- Location:
- trunk/roundcubemail/program
- Files:
-
- 3 edited
-
include/rcube_imap.php (modified) (1 diff)
-
include/rcube_imap_generic.php (modified) (4 diffs)
-
steps/mail/sendmail.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap.php
r3443 r3446 1415 1415 } 1416 1416 1417 1418 /** 1419 * Direct (real and simple) SEARCH request to IMAP server, 1420 * without result sorting and caching 1421 * 1422 * @param string Mailbox name to search in 1423 * @param string Search string 1424 * @param boolean True if UIDs should be returned 1425 * @return array Search results as list of message IDs or UIDs 1426 * @access public 1427 */ 1428 function search_once($mbox_name='', $str=NULL, $ret_uid=false) 1429 { 1430 if (!$str) 1431 return false; 1432 1433 $mailbox = $mbox_name ? $this->mod_mailbox($mbox_name) : $this->mailbox; 1434 1435 return $this->conn->search($mailbox, $str, $ret_uid); 1436 } 1437 1417 1438 1418 1439 /** -
trunk/roundcubemail/program/include/rcube_imap_generic.php
r3445 r3446 367 367 368 368 // generate hash 369 $hash = md5($this-> xor($pass,$opad) . pack("H*", md5($this->xor($pass, $ipad) . base64_decode($encChallenge))));369 $hash = md5($this->_xor($pass,$opad) . pack("H*", md5($this->_xor($pass, $ipad) . base64_decode($encChallenge)))); 370 370 371 371 // generate reply … … 1554 1554 } 1555 1555 1556 function search($folder, $criteria )1556 function search($folder, $criteria, $return_uid=false) 1557 1557 { 1558 1558 if (!$this->select($folder)) { … … 1561 1561 1562 1562 $data = ''; 1563 $query = "srch1 SEARCH ". chop($criteria);1563 $query = 'srch1 ' . ($return_uid ? 'UID ' : '') . 'SEARCH ' . chop($criteria); 1564 1564 1565 1565 if (!$this->putLineC($query)) { 1566 1566 return false; 1567 1567 } 1568 1568 1569 do { 1569 1570 $line = trim($this->readLine()); … … 2151 2152 } 2152 2153 2153 private function xor($string, $string2)2154 private function _xor($string, $string2) 2154 2155 { 2155 2156 $result = ''; -
trunk/roundcubemail/program/steps/mail/sendmail.inc
r3435 r3446 618 618 { 619 619 // delete previous saved draft 620 $a_deleteid = $IMAP->search ($CONFIG['drafts_mbox'], 'HEADER Message-ID '.$olddraftmessageid);621 622 $deleted = $IMAP->delete_message($ IMAP->get_uid($a_deleteid[0], $CONFIG['drafts_mbox']), $CONFIG['drafts_mbox']);620 $a_deleteid = $IMAP->search_once($CONFIG['drafts_mbox'], 621 'HEADER Message-ID '.$olddraftmessageid, true); 622 $deleted = $IMAP->delete_message($a_deleteid, $CONFIG['drafts_mbox']); 623 623 624 624 // raise error if deletion of old draft failed … … 640 640 641 641 // remember new draft-uid 642 $draft ids = $IMAP->search($CONFIG['drafts_mbox'], 'HEADER Message-ID '.$msgid);643 $_SESSION['compose']['param']['_draft_uid'] = $ IMAP->get_uid($draftids[0], $CONFIG['drafts_mbox']);642 $draftuids = $IMAP->search_once($CONFIG['drafts_mbox'], 'HEADER Message-ID '.$msgid, true); 643 $_SESSION['compose']['param']['_draft_uid'] = $draftuids[0]; 644 644 645 645 // display success
Note: See TracChangeset
for help on using the changeset viewer.
