From c06c8d161a081bf1ef58d225caf7a4293dfdd8ca Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Tue, 30 Mar 2010 17:19:00 +0000 Subject: [PATCH] Rename parameter, add phpdoc, fix bug in using $this from a statically called method. --- maintenance/deleteArchivedRevisions.inc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/maintenance/deleteArchivedRevisions.inc b/maintenance/deleteArchivedRevisions.inc index 94f2d47f0d..3dee1c342d 100644 --- a/maintenance/deleteArchivedRevisions.inc +++ b/maintenance/deleteArchivedRevisions.inc @@ -23,7 +23,15 @@ class DeleteArchivedRevisionsImplementation { - static public function doDelete($output) { + /** + * Perform the delete on archived revisions. + + * @param $maint Object An object (typically of class Maintenance) + * that implements two methods: handleOutput() and + * purgeRedundantText(). See Maintenance for a description of + * those methods. + */ + static public function doDelete($maint) { $dbw = wfGetDB( DB_MASTER ); $dbw->begin(); @@ -31,19 +39,19 @@ class DeleteArchivedRevisionsImplementation { $tbl_arch = $dbw->tableName( 'archive' ); # Delete as appropriate - $output->handleOutput( "Deleting archived revisions... " ); + $maint->handleOutput( "Deleting archived revisions... " ); $dbw->query( "DELETE FROM $tbl_arch" ); $count = $dbw->affectedRows(); $deletedRows = $count != 0; - $output->handleOutput( "done. $count revisions deleted.\n" ); + $maint->handleOutput( "done. $count revisions deleted.\n" ); # This bit's done # Purge redundant text records $dbw->commit(); if( $deletedRows ) { - $this->purgeRedundantText( true ); + $maint->purgeRedundantText( true ); } } } \ No newline at end of file -- 2.20.1