Search call back adjusted to fit new format
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 4 Jan 2002 12:51:30 +0000 (12:51 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 4 Jan 2002 12:51:30 +0000 (12:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2090 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php
src/read_body.php
src/search.php

index b0b03b3..6596b86 100644 (file)
@@ -97,7 +97,10 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start
     }
 
     if ($where && $what) {
-        $search_stuff = '&where='.urlencode($where).'&what='.urlencode($what);
+        if( !isset( $pos ) || $pos == '' ) {
+            $pos = '0';
+        }
+        $search_stuff = "&pos=" . urlencode( $pos ) . "&where=".urlencode($where).'&what='.urlencode($what);
     }
 
     $checked = ($checkall == 1 ?' checked' : '');
@@ -914,4 +917,4 @@ function handleAsSent($mailbox) {
     return ($handleAsSent_result);
 }
 
-?>
+?>
\ No newline at end of file
index dd69e6e..ba9be44 100644 (file)
@@ -362,19 +362,20 @@ require_once('../functions/url_parser.php');
                 if ($show_more_cc == false) {
                     if ($i == 1) {
                         /* From a search... */
+                        $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id";
                         if (isset($where) && isset($what)) {
-                            $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&what=".urlencode($what)."&where=".urlencode($where)."&show_more_cc=1&show_more=$show_more\">$echo_more</A>)";
+                            $cc_string .= "&what=".urlencode($what)."&where=".urlencode($where)."&show_more_cc=1&show_more=$show_more\">$echo_more</A>)";
                         } else {
-                            $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=1&show_more=$show_more\">$echo_more</A>)";
+                            $cc_string = "&sort=$sort&startMessage=$startMessage&show_more_cc=1&show_more=$show_more\">$echo_more</A>)";
                         }   
                         $i = count($cc_ary);
                     }
                 } else if ($i == 1) {
                     /* From a search... */
                     if (isset($where) && isset($what)) {
-                        $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&what=".urlencode($what)."&where=".urlencode($where)."&show_more_cc=0&show_more=$show_more\">$echo_less</A>)";
+                        $cc_string .= "&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&what=".urlencode($what)."&where=".urlencode($where)."&show_more_cc=0&show_more=$show_more\">$echo_less</A>)";
                     } else {
-                        $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=0&show_more=$show_more\">$echo_less</A>)";
+                        $cc_string .= "&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=0&show_more=$show_more\">$echo_less</A>)";
                     }   
                 }
             }
@@ -445,8 +446,12 @@ require_once('../functions/url_parser.php');
          '         <TR>' . "\n" .
          '            <TD ALIGN="LEFT" WIDTH="33%">' . "\n" .
          '               <SMALL>' . "\n";
+         
     if ($where && $what) {
-        echo "               <A HREF=\"search.php?where=".urlencode($where)."&what=".urlencode($what)."&mailbox=$urlMailbox\">";
+        if( $pos == '' ) {
+            $pos = 0;
+        }
+        echo "               <A HREF=\"search.php?where$pos=".urlencode($where)."&pos=$pos&what$pos=".urlencode($what)."&mailbox=$urlMailbox\">";
     } else {
         echo "               <A HREF=\"right_main.php?use_mailbox_cache=1&sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">";
     }
@@ -655,4 +660,4 @@ require_once('../functions/url_parser.php');
     do_hook('read_body_bottom');
     do_hook('html_bottom');
     sqimap_logout($imapConnection);
-?>
+?>
\ No newline at end of file
index 14de0d8..2c615bc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * right_main.php
+ * search.php
  *
  * Copyright (c) 1999-2002 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.