Changeset 7ab9c17 in github
- Timestamp:
- Jun 26, 2012 5:11:53 AM (11 months ago)
- Branches:
- master, HEAD
- Children:
- 0be8bd1, e742744
- Parents:
- d86aa13
- Location:
- program/include
- Files:
-
- 2 edited
-
rcube_imap_cache.php (modified) (1 diff)
-
rcube_imap_generic.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap_cache.php
r7eb4f2e r7ab9c17 918 918 } 919 919 920 // NOTE: make sure the mailbox isn't selected, before921 // enabling QRESYNC and invoking SELECT922 if ($this->imap->conn->selected !== null) {923 $this->imap->conn->close();924 }925 926 920 // Enable QRESYNC 927 921 $res = $this->imap->conn->enable($qresync ? 'QRESYNC' : 'CONDSTORE'); 928 if ( !is_array($res)) {922 if ($res === false) { 929 923 return; 924 } 925 926 // Close mailbox if already selected to get most recent data 927 if ($this->imap->conn->selected == $mailbox) { 928 $this->imap->conn->close(); 930 929 } 931 930 -
program/include/rcube_imap_generic.php
r43918dd2 r7ab9c17 1473 1473 function enable($extension) 1474 1474 { 1475 if (empty($extension)) 1476 return false; 1477 1478 if (!$this->hasCapability('ENABLE')) 1479 return false; 1480 1481 if (!is_array($extension)) 1475 if (empty($extension)) { 1476 return false; 1477 } 1478 1479 if (!$this->hasCapability('ENABLE')) { 1480 return false; 1481 } 1482 1483 if (!is_array($extension)) { 1482 1484 $extension = array($extension); 1485 } 1486 1487 if (!empty($this->extensions_enabled)) { 1488 // check if all extensions are already enabled 1489 $diff = array_diff($extension, $this->extensions_enabled); 1490 1491 if (empty($diff)) { 1492 return $extension; 1493 } 1494 1495 // Make sure the mailbox isn't selected, before enabling extension(s) 1496 if ($this->selected !== null) { 1497 $this->close(); 1498 } 1499 } 1483 1500 1484 1501 list($code, $response) = $this->execute('ENABLE', $extension); … … 1488 1505 $result = (array) $this->tokenizeResponse($response); 1489 1506 1490 return $result; 1507 $this->extensions_enabled = array_unique(array_merge((array)$this->extensions_enabled, $result)); 1508 1509 return $this->extensions_enabled; 1491 1510 } 1492 1511
Note: See TracChangeset
for help on using the changeset viewer.
