Double-check that all old revision are set null.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 29 Jul 2008 14:14:10 +0000 (14:14 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 29 Jul 2008 14:14:10 +0000 (14:14 +0000)
includes/SearchPostgres.php

index 88e4a0d..7f15f67 100644 (file)
@@ -201,9 +201,9 @@ 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 = ".
+               $SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN ".
                                "(SELECT rev_text_id FROM revision WHERE rev_page = $pageid ".
-                               "ORDER BY rev_text_id DESC LIMIT 1 OFFSET 1)";
+                               "ORDER BY rev_text_id DESC OFFSET 1)";
                $this->db->doQuery($SQL);
                return true;
        }