Skip to content

Commit

Permalink
Merge pull request #434 from kroky/bugfix/date-sort
Browse files Browse the repository at this point in the history
Expose default sort order even on combined message views
  • Loading branch information
jasonmunro committed Oct 20, 2020
2 parents dfa8a56 + 542de99 commit 52fb74d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/imap/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,6 @@ public function process() {
$this->out('list_filter', $this->request->get['filter']);
}
}
if (array_key_exists('sort', $this->request->get)) {
if (in_array($this->request->get['sort'], array('arrival', 'from', 'subject',
'date', 'to', '-arrival', '-from', '-subject', '-date', '-to'), true)) {
$this->out('list_sort', $this->request->get['sort']);
}
} elseif ($default_sort_order = $this->user_config->get('default_sort_order_setting', false)) {
$this->out('list_sort', $default_sort_order);
}
if (!empty($details)) {
if (array_key_exists('folder_label', $this->request->get)) {
$folder = $this->request->get['folder_label'];
Expand All @@ -515,6 +507,14 @@ public function process() {
$this->out('per_source_limit', $this->user_config->get('sent_per_source_setting', DEFAULT_PER_SOURCE));
$this->out('message_list_since', $this->user_config->get('sent_since_setting', DEFAULT_SINCE));
}
if (array_key_exists('sort', $this->request->get)) {
if (in_array($this->request->get['sort'], array('arrival', 'from', 'subject',
'date', 'to', '-arrival', '-from', '-subject', '-date', '-to'), true)) {
$this->out('list_sort', $this->request->get['sort']);
}
} elseif ($default_sort_order = $this->user_config->get('default_sort_order_setting', false)) {
$this->out('list_sort', $default_sort_order);
}
}
}
}
Expand Down

0 comments on commit 52fb74d

Please sign in to comment.