Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions modules/core/output_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ class Hm_Output_message_list_heading extends Hm_Output_Module {
*/
protected function output() {
$search_field = '';
$terms = $this->get('search_terms', '');
$terms = $this->get('list_keyword', '');
if ($this->get('custom_list_controls', '')) {
$config_link = $this->get('custom_list_controls');
$source_link = '';
Expand All @@ -1978,10 +1978,7 @@ protected function output() {
}
$config_link = '<a title="'.$this->trans('Configure').'" href="?page=settings#'.$path.'_setting"><i class="bi bi-gear-wide refresh_list"></i></a>';
$refresh_link = '<a class="refresh_link" title="'.$this->trans('Refresh').'" href="#"><i class="bi bi-arrow-clockwise refresh_list"></i></a>';
//$search_field = '<form method="GET">
//<input type="hidden" name="page" value="message_list" />
//<input type="hidden" name="list_path" value="'.$this->html_safe($this->get('list_path')).'"/>
//<input required type="search" placeholder="'.$this->trans('Search').'" id="search_terms" class="imap_keyword" name="search_terms" value="'.$this->html_safe($terms).'"/></form>';
$search_field = '<form method="GET"><input type="hidden" name="page" value="message_list" /><input type="hidden" name="list_path" value="'.$this->html_safe($this->get('list_path')).'"/><input required type="search" placeholder="'.$this->trans('Search').'" id="search_terms" class="form-control imap_keyword" name="keyword" value="'.$this->html_safe($terms).'"/></form>';

}
else {
Expand Down
12 changes: 9 additions & 3 deletions modules/imap/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,6 @@ public function process() {
}
}
$this->out('custom_list_controls_type', $custom_link);
if (array_key_exists('keyword', $this->request->get)) {
$this->out('list_keyword', $this->request->get['keyword']);
}
if (array_key_exists('filter', $this->request->get)) {
if (in_array($this->request->get['filter'], array('all', 'unseen', 'seen',
'answered', 'unanswered', 'flagged', 'unflagged'), true)) {
Expand Down Expand Up @@ -605,6 +602,10 @@ public function process() {
} elseif ($default_sort_order = $this->user_config->get('default_sort_order_setting', false)) {
$this->out('list_sort', $default_sort_order);
}

if (array_key_exists('keyword', $this->request->get)) {
$this->out('list_keyword', $this->request->get['keyword']);
}
}
}
}
Expand Down Expand Up @@ -1359,6 +1360,11 @@ public function process() {

$terms = [[search_since_based_on_setting($this->user_config), $date]];

if ($this->request->get['keyword']) {
$keyword = validate_search_terms($this->request->get['keyword']);
$terms[] = [validate_search_fld(DEFAULT_SEARCH_FLD), $keyword];
}

$messages = [];
$status = [];
foreach ($ids as $key => $id) {
Expand Down
Loading