Use table prefix when clearing recentchanges
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 6 Feb 2005 11:37:16 +0000 (11:37 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 6 Feb 2005 11:37:16 +0000 (11:37 +0000)
includes/Article.php

index bff74f0..e1d8adc 100644 (file)
@@ -1805,7 +1805,8 @@ class Article {
                        global $wgRCMaxAge;
                        $dbw =& wfGetDB( DB_MASTER );
                        $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
-                       $sql = "DELETE FROM recentchanges WHERE rc_timestamp < '{$cutoff}'";
+                       $recentchanges = $dbw->tableName( 'recentchanges' );
+                       $sql = "DELETE FROM $recentchanges WHERE rc_timestamp < '{$cutoff}'";
                        $dbw->query( $sql );
                }
                $id = $this->getID();