r81499 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81498‎ | r81499 | r81500 >
Date:00:40, 4 February 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
Use the right query parameter.
Modified paths:
  • /trunk/phase3/includes/search/SearchPostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/search/SearchPostgres.php
@@ -146,7 +146,7 @@
147147
148148 ## We need a separate query here so gin does not complain about empty searches
149149 $SQL = "SELECT to_tsquery($searchstring)";
150 - $res = $this->db->doQuery($SQL);
 150+ $res = $this->db->query($SQL);
151151 if (!$res) {
152152 ## TODO: Better output (example to catch: one 'two)
153153 die ("Sorry, that was not a valid search string. Please go back and try again");
@@ -201,7 +201,7 @@
202202 function update( $pageid, $title, $text ) {
203203 ## We don't want to index older revisions
204204 $SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN ".
205 - "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
 205+ "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
206206 " ORDER BY rev_text_id DESC OFFSET 1)";
207207 $this->db->query($SQL);
208208 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r92328REL1_18 MFT r79056, r80612, r81499, r87627, r87628, r87630, r87998, r88134, r...reedy22:46, 15 July 2011

Comments

#Comment by Reedy (talk | contribs)   22:00, 7 July 2011

bug 29761 Postgres-based searching breaks between 1.13.1 and 1.17.0

These changes look to have been made before 1.18...

But Roan merged it in r80190 from r78450 originally

http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_17/phase3/includes/search/SearchPostgres.php?view=annotate

Status & tagging log