Skip to content

Commit

Permalink
Optimize LIST command generation
Browse files Browse the repository at this point in the history
Don't send select options if there are none.
  • Loading branch information
slusarz committed Sep 16, 2014
1 parent 531c931 commit 4a60f57
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
Expand Up @@ -1333,10 +1333,11 @@ protected function _getMailboxList($pattern, $mode, $options,
$select_opts->add('RECURSIVEMATCH');
}

$cmd->add(array(
$select_opts,
''
));
if (!empty($select_opts)) {
$cmd->add($select_opts);
}

$cmd->add('');

$tmp = new Horde_Imap_Client_Data_Format_List();
foreach ($pattern as $val) {
Expand Down

0 comments on commit 4a60f57

Please sign in to comment.