Add possibility to search in message body only (#1488770)

pull/54/merge
Aleksander Machniak 12 years ago
parent 5438956deb
commit 347ba311e6

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Add possibility to search in message body only (#1488770)
- Support "multipart/relative" as an alias for "multipart/related" type (#1488886) - Support "multipart/relative" as an alias for "multipart/related" type (#1488886)
- Display PGP/MIME signature attachments as "Digital Signature" (#1488570) - Display PGP/MIME signature attachments as "Digital Signature" (#1488570)
- Workaround UW-IMAP bug where hierarchy separator is added to the shared folder name (#1488879) - Workaround UW-IMAP bug where hierarchy separator is added to the shared folder name (#1488879)

@ -200,6 +200,7 @@ $labels['quicksearch'] = 'Quick search';
$labels['resetsearch'] = 'Reset search'; $labels['resetsearch'] = 'Reset search';
$labels['searchmod'] = 'Search modifiers'; $labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message'; $labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
$labels['openinextwin'] = 'Open in new window'; $labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)'; $labels['emlsave'] = 'Download (.eml)';

@ -69,7 +69,7 @@ else if (preg_match("/^subject:.*/i", $str))
else if (preg_match("/^body:.*/i", $str)) else if (preg_match("/^body:.*/i", $str))
{ {
list(,$srch) = explode(":", $str); list(,$srch) = explode(":", $str);
$subject['text'] = "TEXT"; $subject['body'] = "BODY";
} }
else if (strlen(trim($str))) else if (strlen(trim($str)))
{ {
@ -81,7 +81,7 @@ else if (strlen(trim($str)))
break; break;
} }
else { 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 = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT);
$search_mods[$mbox] = array_fill_keys(array_keys($subject), 1); $search_mods[$mbox] = array_fill_keys(array_keys($subject), 1);
$RCMAIL->user->save_prefs(array('search_mods' => $search_mods)); $RCMAIL->user->save_prefs(array('search_mods' => $search_mods));
} else { }
else {
// search in subject by default // search in subject by default
$subject['subject'] = 'HEADER SUBJECT'; $subject['subject'] = 'HEADER SUBJECT';
} }

@ -115,6 +115,7 @@
<li><input type="checkbox" name="s_mods[]" value="to" id="s_mod_to" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_to"><roundcube:label name="to" /></label></li> <li><input type="checkbox" name="s_mods[]" value="to" id="s_mod_to" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_to"><roundcube:label name="to" /></label></li>
<li><input type="checkbox" name="s_mods[]" value="cc" id="s_mod_cc" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_cc"><roundcube:label name="cc" /></label></li> <li><input type="checkbox" name="s_mods[]" value="cc" id="s_mod_cc" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_cc"><roundcube:label name="cc" /></label></li>
<li><input type="checkbox" name="s_mods[]" value="bcc" id="s_mod_bcc" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_bcc"><roundcube:label name="bcc" /></label></li> <li><input type="checkbox" name="s_mods[]" value="bcc" id="s_mod_bcc" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_bcc"><roundcube:label name="bcc" /></label></li>
<li><input type="checkbox" name="s_mods[]" value="body" id="s_mod_body" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_body"><roundcube:label name="body" /></label></li>
<li><input type="checkbox" name="s_mods[]" value="text" id="s_mod_text" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_text"><roundcube:label name="msgtext" /></label></li> <li><input type="checkbox" name="s_mods[]" value="text" id="s_mod_text" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_text"><roundcube:label name="msgtext" /></label></li>
</ul> </ul>
</div> </div>

@ -133,6 +133,7 @@
<li><label><input type="checkbox" name="s_mods[]" value="to" id="s_mod_to" onclick="UI.set_searchmod(this)" /> <roundcube:label name="to" /></label></li> <li><label><input type="checkbox" name="s_mods[]" value="to" id="s_mod_to" onclick="UI.set_searchmod(this)" /> <roundcube:label name="to" /></label></li>
<li><label><input type="checkbox" name="s_mods[]" value="cc" id="s_mod_cc" onclick="UI.set_searchmod(this)" /> <roundcube:label name="cc" /></label></li> <li><label><input type="checkbox" name="s_mods[]" value="cc" id="s_mod_cc" onclick="UI.set_searchmod(this)" /> <roundcube:label name="cc" /></label></li>
<li><label><input type="checkbox" name="s_mods[]" value="bcc" id="s_mod_bcc" onclick="UI.set_searchmod(this)" /> <roundcube:label name="bcc" /></label></li> <li><label><input type="checkbox" name="s_mods[]" value="bcc" id="s_mod_bcc" onclick="UI.set_searchmod(this)" /> <roundcube:label name="bcc" /></label></li>
<li><label><input type="checkbox" name="s_mods[]" value="body" id="s_mod_body" onclick="UI.set_searchmod(this)" /> <roundcube:label name="body" /></label></li>
<li><label><input type="checkbox" name="s_mods[]" value="text" id="s_mod_text" onclick="UI.set_searchmod(this)" /> <roundcube:label name="msgtext" /></label></li> <li><label><input type="checkbox" name="s_mods[]" value="text" id="s_mod_text" onclick="UI.set_searchmod(this)" /> <roundcube:label name="msgtext" /></label></li>
</ul> </ul>
</div> </div>

Loading…
Cancel
Save