/** SUBJECT **/
else if (strtolower(substr($read[$i], 0, 8)) == "subject:") {
$hdr->subject = trim(substr($read[$i], 8, strlen($read[$i]) - 9));
- if (strlen(Chop($hdr->subject)) == 0)
+ if (strlen(Chop($hdr->subject)) == 0) {
$hdr->subject = _("(no subject)");
-
- if ($where == "SUBJECT") {
- $hdr->subject = eregi_replace($what, "<b>\\0</b>", $hdr->subject);
}
+
+ /*
+ if ($where == 'SUBJECT') {
+ $hdr->subject = $what;
+ // $hdr->subject = eregi_replace($what, "<b>\\0</b>", $hdr->subject);
+ }
+ */
+
$i++;
}
/** CC **/
require_once('../functions/mailbox_display.php');
require_once('../functions/mime.php');
-function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color) {
+function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color, $search_position = '') {
global $msgs, $message_highlight_list, $squirrelmail_language, $languages, $index_order;
+ global $pos;
+
+ $pos = $search_position;
$urlMailbox = urlencode($mailbox);
$isid = sqimap_session_id();
if (count($messagelist) > 0) {
$j=0;
- if (!isset ($msg)) { $msg = ""; }
+ if (!isset ($msg)) {
+ $msg = '';
+ }
mail_message_listing_beginning( $imapConnection,
- "move_messages.php?msg=$msg&mailbox=$urlMailbox&where=" . urlencode($search_where) . "&what=".urlencode($search_what),
+ "move_messages.php?msg=$msg&mailbox=$urlMailbox&pos=$pos&where=" . urlencode($search_where) . "&what=".urlencode($search_what),
$mailbox,
-1,
'<b>' . _("Found") . ' ' . count($messagelist) . ' ' . _("messages") . '</b>',
global $default_use_priority;
global $message_highlight_list;
global $index_order;
+ global $pos; /* Search postion (if any) */
$color_string = $color[4];
if ($GLOBALS['alt_index_colors']) {
if (isset($$where) && $$where && isset($$what) && $$what) {
sqimap_mailbox_select($imapConnection, $mailbox);
- sqimap_search($imapConnection, $$where, $$what, $mailbox, $color);
+ sqimap_search($imapConnection, $$where, $$what, $mailbox, $color, $pos);
}
do_hook("search_bottom");
sqimap_logout ($imapConnection);