MediaWiki
REL1_20
|
Generic class to cleanup a database table. More...
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
runTable ($params) | |
Public Attributes | |
$batchSize = 100 | |
$reportInterval = 100 | |
Protected Member Functions | |
hexChar ($matches) | |
init ($count, $table) | |
progress ($updated) | |
Protected Attributes | |
$defaultParams | |
$dryrun = false | |
$maxLag = 10 |
Generic class to cleanup a database table.
Already subclasses Maintenance.
Definition at line 31 of file cleanupTable.inc.
Default constructor.
Children should call this *first* if implementing their own constructors
Reimplemented from Maintenance.
Reimplemented in ImageCleanup, WatchlistCleanup, CapsCleanup, and TitleCleanup.
Definition at line 44 of file cleanupTable.inc.
References Maintenance\addOption().
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Reimplemented in WatchlistCleanup, and CapsCleanup.
Definition at line 49 of file cleanupTable.inc.
References $wgUser, Maintenance\hasOption(), User\newFromName(), Maintenance\output(), and runTable().
TableCleanup::hexChar | ( | $ | matches | ) | [protected] |
Definition at line 159 of file cleanupTable.inc.
References $matches.
TableCleanup::init | ( | $ | count, |
$ | table | ||
) | [protected] |
TableCleanup::progress | ( | $ | updated | ) | [protected] |
Definition at line 69 of file cleanupTable.inc.
References Maintenance\output(), wfTimestamp(), and wfWikiID().
Referenced by TitleCleanup\processRow(), ImageCleanup\processRow(), WatchlistCleanup\processRow(), CapsCleanup\processRow(), and TableCleanupTest\processRow().
TableCleanup::runTable | ( | $ | params | ) |
Definition at line 99 of file cleanupTable.inc.
References $count, $dbr, $options, $params, $res, init(), Maintenance\output(), and wfGetDB().
Referenced by CapsCleanup\execute(), and execute().
TableCleanup::$batchSize = 100 |
Definition at line 41 of file cleanupTable.inc.
TableCleanup::$defaultParams [protected] |
array( 'table' => 'page', 'conds' => array(), 'index' => 'page_id', 'callback' => 'processRow', )
Reimplemented in ImageCleanup, and WatchlistCleanup.
Definition at line 32 of file cleanupTable.inc.
TableCleanup::$dryrun = false [protected] |
Definition at line 39 of file cleanupTable.inc.
TableCleanup::$maxLag = 10 [protected] |
Definition at line 40 of file cleanupTable.inc.
TableCleanup::$reportInterval = 100 |
Definition at line 42 of file cleanupTable.inc.