From: Mark A. Hershberger Date: Fri, 4 Feb 2011 00:40:33 +0000 (+0000) Subject: Use the right query parameter. X-Git-Tag: 1.31.0-rc.0~32214 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=6e1e4e163d6d90ff7a36d999d6407734ce7a0fd5;p=lhc%2Fweb%2Fwiklou.git Use the right query parameter. --- 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;