--quiet : Quiet non-error output
--dbuser : The database user to use for the script (if needed)
--dbpass : Same as above (if needed)
+--conf : Location of LocalSettings.php, if not default
+--wiki : For specifying the wiki ID
+--batch-size : If the script supports batch operations, do this many per batch
3. HOW TO WRITE YOUR OWN
Make a file in the maintenance directory called myScript.php or something.
parent::__construct();
}
- protected function execute() {
+ public function execute() {
}
}
$maintClass = "DemoMaint";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );
==END==
That's it. In the execute() method, you have access to all of the normal
MediaWiki functions, so you can get a DB connection, use the cache, etc.
For full docs on the Maintenance class, see the auto-generated docs at
-http://svn.wikimedia.org/doc/classMaintenance.html
\ No newline at end of file
+http://svn.wikimedia.org/doc/classMaintenance.html