Merge "(bug 40610) Prevent editing textarea from overflowing out of bodyContent"
[lhc/web/wiklou.git] / maintenance / purgeOldText.inc
index 743b3fc..111c786 100644 (file)
@@ -27,7 +27,7 @@ function PurgeRedundantText( $delete = false ) {
 
        # Data should come off the master, wrapped in a transaction
        $dbw = wfGetDB( DB_MASTER );
-       $dbw->begin();
+       $dbw->begin( __METHOD__ );
 
        $tbl_arc = $dbw->tableName( 'archive' );
        $tbl_rev = $dbw->tableName( 'revision' );
@@ -44,6 +44,7 @@ function PurgeRedundantText( $delete = false ) {
        # Get "active" text records from the archive table
        echo( "Searching for active text records in archive table..." );
        $res = $dbw->query( "SELECT DISTINCT ar_text_id FROM $tbl_arc" );
+       $cur = array();
        foreach ( $res as $row ) {
                $cur[] = $row->ar_text_id;
        }
@@ -72,6 +73,6 @@ function PurgeRedundantText( $delete = false ) {
        }
 
        # Done
-       $dbw->commit();
+       $dbw->commit( __METHOD__ );
 
 }