summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-09-03 13:01:38 +0200
committerAleksander Machniak <alec@alec.pl>2014-09-03 13:01:38 +0200
commit02f762831461233809c95189b1b4e9a647e22944 (patch)
treeeb48901d23b7e065ce82979d5af141fa3e57c6b3 /program/steps/mail/func.inc
parent334bc9792789732fd5657df5abb233ad0c2da512 (diff)
Fix page title when using search filter (#1490023)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc27
1 files changed, 22 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index a7c483bba..25f2e3175 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -79,6 +79,8 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
if (!empty($_SESSION['search_scope']))
$OUTPUT->set_env('search_scope', $_SESSION['search_scope']);
+
+ rcmail_list_pagetitle();
}
$threading = (bool) $RCMAIL->storage->get_threading();
@@ -119,11 +121,6 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
'flagged', 'unflagged', 'unread', 'deleted', 'replied', 'forwarded',
'priority', 'withattachment', 'fileuploaderror');
}
-
- $pagetitle = $RCMAIL->localize_foldername($mbox_name, true);
- $pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle);
-
- $OUTPUT->set_pagetitle($pagetitle);
}
// register UI objects
@@ -218,6 +215,26 @@ function rcmail_init_env()
}
/**
+ * Sets page title
+ */
+function rcmail_list_pagetitle()
+{
+ global $RCMAIL;
+
+ if ($RCMAIL->output->get_env('search_request')) {
+ $pagetitle = $RCMAIL->gettext('searchresult');
+ }
+ else {
+ $mbox_name = $RCMAIL->storage->get_folder();
+ $delimiter = $RCMAIL->storage->get_hierarchy_delimiter();
+ $pagetitle = $RCMAIL->localize_foldername($mbox_name, true);
+ $pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle);
+ }
+
+ $RCMAIL->output->set_pagetitle($pagetitle);
+}
+
+/**
* Returns default search mods
*/
function rcmail_search_mods()