Revision: 1849
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1849&view=rev
Author:   cimorrison
Date:     2011-07-14 09:23:58 +0000 (Thu, 14 Jul 2011)

Log Message:
-----------
Fixed bug that meant that '0' was treated as an invalid search string

Modified Paths:
--------------
    mrbs/trunk/web/Themes/default/header.inc
    mrbs/trunk/web/search.php

Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc    2011-07-14 09:03:31 UTC (rev 
1848)
+++ mrbs/trunk/web/Themes/default/header.inc    2011-07-14 09:23:58 UTC (rev 
1849)
@@ -94,7 +94,7 @@
   {
     $year  = date("Y");
   }
-  if (empty($search_str))
+  if (!isset($search_str))
   {
     $search_str = "";
   }

Modified: mrbs/trunk/web/search.php
===================================================================
--- mrbs/trunk/web/search.php   2011-07-14 09:03:31 UTC (rev 1848)
+++ mrbs/trunk/web/search.php   2011-07-14 09:23:58 UTC (rev 1849)
@@ -28,7 +28,7 @@
 $is_admin =  (isset($user) && authGetUserLevel($user)>=2) ;
 
 // Need all these different versions with different escaping.
-if (!empty($search_str)) 
+if (isset($search_str) && ($search_str != '')) 
 {
   $search_url = urlencode($search_str);
   $search_html = htmlspecialchars($search_str);
@@ -62,7 +62,7 @@
   exit;
 }
 
-if (!$search_str)
+if (!isset($search_str) || ($search_str == ''))
 {
   echo "<p class=\"error\">" . get_vocab("invalid_search") . "</p>";
   require_once "trailer.inc";


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

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to