From: Mark A. Hershberger Date: Tue, 30 Mar 2010 17:19:00 +0000 (+0000) Subject: Rename parameter, add phpdoc, fix bug in using $this from a statically called method. X-Git-Tag: 1.31.0-rc.0~37303 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=c06c8d161a081bf1ef58d225caf7a4293dfdd8ca;p=lhc%2Fweb%2Fwiklou.git Rename parameter, add phpdoc, fix bug in using $this from a statically called method. --- 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