diff --git a/CHANGELOG b/CHANGELOG index 5a594c07e..d3ebabc3e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add possibility to search in message body only (#1488770) - Support "multipart/relative" as an alias for "multipart/related" type (#1488886) - Display PGP/MIME signature attachments as "Digital Signature" (#1488570) - Workaround UW-IMAP bug where hierarchy separator is added to the shared folder name (#1488879) diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index d2a46ecc6..9deaa6677 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -200,6 +200,7 @@ $labels['quicksearch'] = 'Quick search'; $labels['resetsearch'] = 'Reset search'; $labels['searchmod'] = 'Search modifiers'; $labels['msgtext'] = 'Entire message'; +$labels['body'] = 'Body'; $labels['openinextwin'] = 'Open in new window'; $labels['emlsave'] = 'Download (.eml)'; diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc index f9b8f9e67..fb1b48797 100644 --- a/program/steps/mail/search.inc +++ b/program/steps/mail/search.inc @@ -69,7 +69,7 @@ else if (preg_match("/^subject:.*/i", $str)) else if (preg_match("/^body:.*/i", $str)) { list(,$srch) = explode(":", $str); - $subject['text'] = "TEXT"; + $subject['body'] = "BODY"; } else if (strlen(trim($str))) { @@ -81,7 +81,7 @@ else if (strlen(trim($str))) break; } else { - $subject[$header] = 'HEADER '.strtoupper($header); + $subject[$header] = ($header != 'body' ? 'HEADER ' : '') . strtoupper($header); } } @@ -89,7 +89,8 @@ else if (strlen(trim($str))) $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT); $search_mods[$mbox] = array_fill_keys(array_keys($subject), 1); $RCMAIL->user->save_prefs(array('search_mods' => $search_mods)); - } else { + } + else { // search in subject by default $subject['subject'] = 'HEADER SUBJECT'; } diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html index 96fe72ecd..ad67d8e89 100644 --- a/skins/classic/templates/mail.html +++ b/skins/classic/templates/mail.html @@ -115,6 +115,7 @@
  • +
  • diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index 751ab82a4..cd817c1de 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -133,6 +133,7 @@
  • +