Skip to content

Commit

Permalink
Fix loading unsubscribed mailboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Oct 11, 2013
1 parent 523910c commit 11fc382
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions imp/lib/Search/Ui.php
Expand Up @@ -43,15 +43,19 @@ public function getSearchMboxList($unsub = false)
));
$view->allsearch = IMP_Mailbox::formTo(IMP_Search_Query::ALLSEARCH);

$mask = $unsub
? IMP_Ftree_IteratorFilter::UNSUB
: 0;
$ftree = $injector->getInstance('IMP_Ftree');
if ($unsub) {
$mask = IMP_Ftree_IteratorFilter::UNSUB;
$ftree->loadUnsubscribed();
} else {
$mask = 0;
}
if ($registry->getView() != $registry::VIEW_DYNAMIC) {
$mask |= IMP_Ftree_IteratorFilter::NO_REMOTE;
}
$filter = IMP_Ftree_IteratorFilter::create($mask);

$ob->tree = $injector->getInstance('IMP_Ftree')->createTree('imp_search', array(
$ob->tree = $ftree->createTree('imp_search', array(
'iterator' => $filter,
'render_params' => array(
'abbrev' => 0,
Expand Down

0 comments on commit 11fc382

Please sign in to comment.