Revision: 1485
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1485&view=rev
Author:   cimorrison
Date:     2010-10-05 07:45:24 +0000 (Tue, 05 Oct 2010)

Log Message:
-----------
Fixed bug which caused Previous and Next links in search results not to work 
properly if the search start date was not the same as today's date.

Modified Paths:
--------------
    mrbs/trunk/web/search.php

Modified: mrbs/trunk/web/search.php
===================================================================
--- mrbs/trunk/web/search.php   2010-09-30 14:12:22 UTC (rev 1484)
+++ mrbs/trunk/web/search.php   2010-10-05 07:45:24 UTC (rev 1485)
@@ -178,12 +178,12 @@
   echo "</div>\n";
   
   echo "<div id=\"record_nav\">\n";
+  $base_query_string = 
"search_str=$search_url&amp;total=$total&amp;from_year=$year&amp;from_month=$month&amp;from_day=$day";
   // display a "Previous" button if necessary
   if($has_prev)
   {
-    echo "<a href=\"search.php?search_str=$search_url&amp;search_pos=";
-    echo max(0, $search_pos-$search["count"]);
-    echo "&amp;total=$total&amp;year=$year&amp;month=$month&amp;day=$day\">";
+    $query_string = $base_query_string . "&amp;search_pos=" . max(0, 
$search_pos-$search["count"]);
+    echo "<a href=\"search.php?$query_string\">";
   }
 
   echo get_vocab("previous");
@@ -199,9 +199,8 @@
   // display a "Previous" button if necessary
   if ($has_next)
   {
-    echo "<a href=\"search.php?search_str=$search_url&amp;search_pos=";
-    echo max(0, $search_pos+$search["count"]);
-    echo "&amp;total=$total&amp;year=$year&amp;month=$month&amp;day=$day\">";
+    $query_string = $base_query_string . "&amp;search_pos=" . max(0, 
$search_pos+$search["count"]);
+    echo "<a href=\"search.php?$query_string\">";
   }
 
   echo get_vocab("next");


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to