Add the Postgres slash search fix to existing installations.
[lhc/web/wiklou.git] / maintenance / purgeOldText.inc
index b6942e7..c4732e9 100644 (file)
@@ -10,7 +10,7 @@
 function PurgeRedundantText( $delete = false ) {
        
        # Data should come off the master, wrapped in a transaction
-       $dbw =& wfGetDB( DB_MASTER );
+       $dbw = wfGetDB( DB_MASTER );
        $dbw->begin();
        
        $tbl_arc = $dbw->tableName( 'archive' );
@@ -37,6 +37,7 @@ function PurgeRedundantText( $delete = false ) {
        echo( "Searching for inactive text records..." );
        $set = implode( ', ', $cur );
        $res = $dbw->query( "SELECT old_id FROM $tbl_txt WHERE old_id NOT IN ( $set )" );
+       $old = array();
        while( $row = $dbw->fetchObject( $res ) ) {
                $old[] = $row->old_id;
        }
@@ -59,4 +60,4 @@ function PurgeRedundantText( $delete = false ) {
        
 }
 
-?>
\ No newline at end of file
+?>