Skip to content

Commit

Permalink
Fix php warnings; Courier doesn't like spaces appended to the EXPUNGE…
Browse files Browse the repository at this point in the history
… command
  • Loading branch information
thomascube committed Nov 24, 2010
1 parent e0a7366 commit e31afbb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions program/include/iniset.php
Expand Up @@ -91,13 +91,15 @@ function rcube_autoload($classname)
'/MDB2_(.+)/',
'/Mail_(.+)/',
'/Net_(.+)/',
'/Auth_(.+)/',
'/^html_.+/',
'/^utf8$/',
),
array(
'MDB2/\\1',
'Mail/\\1',
'Net/\\1',
'Auth/\\1',
'html',
'utf8.class',
),
Expand Down
2 changes: 1 addition & 1 deletion program/include/rcube_imap.php
Expand Up @@ -3236,7 +3236,7 @@ function mod_mailbox($mbox_name, $mode='in')
if (is_array($this->namespace['shared'])) {
foreach ($this->namespace['shared'] as $ns) {
foreach ((array)$ns as $root) {
if (strpos($mbox_name, $root[0]) === 0) {
if ($root[0] && strpos($mbox_name, $root[0]) === 0) {
return $mbox_name;
}
}
Expand Down
6 changes: 4 additions & 2 deletions program/include/rcube_imap_generic.php
Expand Up @@ -1574,8 +1574,10 @@ function expunge($mailbox, $messages=NULL)
// Clear internal status cache
unset($this->data['STATUS:'.$mailbox]);

$result = $this->execute($messages ? 'UID EXPUNGE' : 'EXPUNGE',
array($messages), self::COMMAND_NORESPONSE);
if ($messages)
$result = $this->execute('UID EXPUNGE', array($messages), self::COMMAND_NORESPONSE);
else
$result = $this->execute('EXPUNGE', null, self::COMMAND_NORESPONSE);

if ($result == self::ERROR_OK) {
$this->selected = ''; // state has changed, need to reselect
Expand Down

0 comments on commit e31afbb

Please sign in to comment.