Skip to content

Commit 7f62efa

Browse files
authored
Merge pull request #1693 from IrAlfred/fix-advanced-search-empty-results
fix(frontend/backend): advanced search not displaying any messages
2 parents c314823 + 0b8048a commit 7f62efa

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

modules/advanced_search/modules.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,20 @@ class Hm_Output_filter_imap_advanced_search extends Hm_Output_Module {
370370
*/
371371
protected function output() {
372372
if ($this->get('imap_search_results')) {
373-
prepare_imap_message_list($this->get('imap_search_results'), $this, 'advanced_search');
373+
$adv_search_result = format_imap_message_list(
374+
$this->get('imap_search_results'),
375+
$this,
376+
'advanced_search',
377+
'email'
378+
);
379+
380+
// Convert format (ID => [HTML, ID]) to format expected (HTML => ID)
381+
$res = array();
382+
foreach ($adv_search_result as $id => $row_data) {
383+
$res[$row_data[0]] = $id;
384+
}
385+
386+
$this->out('formatted_message_list', $res);
374387
}
375388
elseif (!$this->get('formatted_message_list')) {
376389
$this->out('formatted_message_list', array());

0 commit comments

Comments
 (0)