From 6e1e4e163d6d90ff7a36d999d6407734ce7a0fd5 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Fri, 4 Feb 2011 00:40:33 +0000 Subject: [PATCH] Use the right query parameter. --- includes/search/SearchPostgres.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/search/SearchPostgres.php b/includes/search/SearchPostgres.php index c06978e73d..f32e898b20 100644 --- a/includes/search/SearchPostgres.php +++ b/includes/search/SearchPostgres.php @@ -146,7 +146,7 @@ class SearchPostgres extends SearchEngine { ## We need a separate query here so gin does not complain about empty searches $SQL = "SELECT to_tsquery($searchstring)"; - $res = $this->db->doQuery($SQL); + $res = $this->db->query($SQL); if (!$res) { ## TODO: Better output (example to catch: one 'two) die ("Sorry, that was not a valid search string. Please go back and try again"); @@ -201,7 +201,7 @@ class SearchPostgres extends SearchEngine { function update( $pageid, $title, $text ) { ## We don't want to index older revisions $SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN ". - "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) . + "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) . " ORDER BY rev_text_id DESC OFFSET 1)"; $this->db->query($SQL); return true; -- 2.20.1