r54236 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54235‎ | r54236 | r54237 >
Date:21:28, 2 August 2009
Author:demon
Status:ok
Tags:
Comment:
tableNamesN() and make init $revisions before trying to use it
Modified paths:
  • /trunk/phase3/maintenance/deleteOrphanedRevisions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/deleteOrphanedRevisions.php
@@ -40,7 +40,7 @@
4141
4242 $dbw = wfGetDB( DB_MASTER );
4343 $dbw->immediateBegin();
44 - list( $page, $revision ) = $dbw->tableNames( 'page', 'revision' );
 44+ list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' );
4545
4646 # Find all the orphaned revisions
4747 $this->output( "Checking for orphaned revisions..." );
@@ -48,6 +48,7 @@
4949 $res = $dbw->query( $sql, 'deleteOrphanedRevisions' );
5050
5151 # Stash 'em all up for deletion (if needed)
 52+ $revisions = array();
5253 while( $row = $dbw->fetchObject( $res ) )
5354 $revisions[] = $row->rev_id;
5455 $dbw->freeResult( $res );

Status & tagging log