Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
Bugdar - Commitdiff - ViewGit - Blue Static

r1581: Fixing a bug where we weren't properly setting $search variables in search.php which was making us rerun a search twice before newly-modified results would show up

Robert Sesek [2007-07-18 06:00]
r1581: Fixing a bug where we weren't properly setting $search variables in search.php which was making us rerun a search twice before newly-modified results would show up
diff --git a/docs/changes.txt b/docs/changes.txt
index 14b6233..d528822 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -1,3 +1,8 @@
+1.2.1
+===============================
+- Change: In installation and upgrade documentation, it is now advised that users delete install/global.php (bug://report/91)
+- Fixed: In order for new results to show up on a rerun search query, the page would have to be refreshed twice (bug://report/90)
+
 1.2.0
 ===============================
 - Fixed: In userctrl_search.tpl, the floated elements need to be before unfloated ones otherwise Gecko engine offsets it by a line
diff --git a/search.php b/search.php
index c16b69a..f12a008 100644
--- a/search.php
+++ b/search.php
@@ -412,8 +412,10 @@ if ($_REQUEST['do'] == 'process')

 	if ($cachedsearch)
 	{
-		$db->query("UPDATE " . TABLE_PREFIX . "search SET ids = '" . implode(',', $ids) . "', resultcount = " . sizeof($results) . ", dateline = " . TIMENOW . " WHERE searchid = " . $cachedsearch['searchid']);
 		$search = $cachedsearch;
+		$search['ids'] = implode(',', $ids);
+		$search['resultcount'] = sizeof($results);
+		$db->query("UPDATE " . TABLE_PREFIX . "search SET ids = '$search[ids]', resultcount = $search[resultcount], dateline = " . TIMENOW . " WHERE searchid = " . $cachedsearch['searchid']);
 	}
 	else
 	{