r64398 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64397‎ | r64398 | r64399 >
Date:17:19, 30 March 2010
Author:mah
Status:ok
Tags:
Comment:
Rename parameter, add phpdoc, fix bug in using $this from a statically called method.
Modified paths:
  • /trunk/phase3/maintenance/deleteArchivedRevisions.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/deleteArchivedRevisions.inc
@@ -23,7 +23,15 @@
2424
2525 class DeleteArchivedRevisionsImplementation {
2626
27 - static public function doDelete($output) {
 27+ /**
 28+ * Perform the delete on archived revisions.
 29+
 30+ * @param $maint Object An object (typically of class Maintenance)
 31+ * that implements two methods: handleOutput() and
 32+ * purgeRedundantText(). See Maintenance for a description of
 33+ * those methods.
 34+ */
 35+ static public function doDelete($maint) {
2836 $dbw = wfGetDB( DB_MASTER );
2937
3038 $dbw->begin();
@@ -31,19 +39,19 @@
3240 $tbl_arch = $dbw->tableName( 'archive' );
3341
3442 # Delete as appropriate
35 - $output->handleOutput( "Deleting archived revisions... " );
 43+ $maint->handleOutput( "Deleting archived revisions... " );
3644 $dbw->query( "DELETE FROM $tbl_arch" );
3745
3846 $count = $dbw->affectedRows();
3947 $deletedRows = $count != 0;
4048
41 - $output->handleOutput( "done. $count revisions deleted.\n" );
 49+ $maint->handleOutput( "done. $count revisions deleted.\n" );
4250
4351 # This bit's done
4452 # Purge redundant text records
4553 $dbw->commit();
4654 if( $deletedRows ) {
47 - $this->purgeRedundantText( true );
 55+ $maint->purgeRedundantText( true );
4856 }
4957 }
5058 }
\ No newline at end of file

Status & tagging log