Commit graph

10 commits

Author SHA1 Message Date
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Alexandre Emsenhuber
635df85f70 Improve documentation of maintenance scripts.
Change-Id: I29dd0d4d18ea3d1b9795fac2f0b74b04ef2d955a
2012-08-11 22:48:09 +02:00
Alexandre Emsenhuber
da4780c12e * Use WikiPage instead of Article to call commitRollback()
* Pass the User object from WikiPage::commitRollback() to WikiPage::doEdit()
* Do the edits with 'Maintenance script' user as other maintenance scripts instead of 127.0.0.1
2012-01-14 14:11:08 +00:00
Sam Reed
44696806fb Remove some unused getting of non existent arguments
Documentation
2011-10-18 17:32:20 +00:00
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