Commit graph

6 commits

Author SHA1 Message Date
Chad Horohoe
26505b170a Fix concern raised by Brion in r74108 (but has really existed since the maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself.
Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild().

Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once().
2011-01-13 22:58:55 +00:00
Sam Reed
f018c81350 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in maintenance stuffs (more to come)
2010-10-13 22:34:25 +00:00
Sam Reed
659778619c Stylize maintenance folder.. 2010-05-22 16:50:39 +00:00
Alexandre Emsenhuber
60172da5c5 Removed colum names from WHERE clause so that it doesn't break for wiki having tables prefix 2010-02-05 15:10:43 +00:00
Chad Horohoe
2857c99dc8 Don't need that anymore 2009-09-01 23:38:46 +00:00
Chad Horohoe
5d30afd3ec Add new maintenance script for mass-rollbacking edits by a given user or IP address. Also can pass a list of titles in case you want to limit it to some pages but not others \o/ 2009-09-01 23:08:54 +00:00