Index: trunk/phase3/maintenance/deleteArchivedRevisions.inc |
— | — | @@ -23,7 +23,15 @@ |
24 | 24 | |
25 | 25 | class DeleteArchivedRevisionsImplementation { |
26 | 26 | |
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) { |
28 | 36 | $dbw = wfGetDB( DB_MASTER ); |
29 | 37 | |
30 | 38 | $dbw->begin(); |
— | — | @@ -31,19 +39,19 @@ |
32 | 40 | $tbl_arch = $dbw->tableName( 'archive' ); |
33 | 41 | |
34 | 42 | # Delete as appropriate |
35 | | - $output->handleOutput( "Deleting archived revisions... " ); |
| 43 | + $maint->handleOutput( "Deleting archived revisions... " ); |
36 | 44 | $dbw->query( "DELETE FROM $tbl_arch" ); |
37 | 45 | |
38 | 46 | $count = $dbw->affectedRows(); |
39 | 47 | $deletedRows = $count != 0; |
40 | 48 | |
41 | | - $output->handleOutput( "done. $count revisions deleted.\n" ); |
| 49 | + $maint->handleOutput( "done. $count revisions deleted.\n" ); |
42 | 50 | |
43 | 51 | # This bit's done |
44 | 52 | # Purge redundant text records |
45 | 53 | $dbw->commit(); |
46 | 54 | if( $deletedRows ) { |
47 | | - $this->purgeRedundantText( true ); |
| 55 | + $maint->purgeRedundantText( true ); |
48 | 56 | } |
49 | 57 | } |
50 | 58 | } |
\ No newline at end of file |