From: Greg Sabino Mullane Date: Tue, 29 Jul 2008 14:14:10 +0000 (+0000) Subject: Double-check that all old revision are set null. X-Git-Tag: 1.31.0-rc.0~46303 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=8a45585945c20636d3cd14f44fd1b7a10d77348d;p=lhc%2Fweb%2Fwiklou.git Double-check that all old revision are set null. --- diff --git a/includes/SearchPostgres.php b/includes/SearchPostgres.php index 88e4a0daf8..7f15f67204 100644 --- a/includes/SearchPostgres.php +++ b/includes/SearchPostgres.php @@ -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; }