Merge "Support for linking directly to sections in ApiFeedWatchlist. It works only...
[lhc/web/wiklou.git] / docs / maintenance.txt
index d46d12e..27619c8 100644 (file)
@@ -15,13 +15,16 @@ subdirectories, all of which have unique purposes.
 level /maintenance directory.
 
 Example:
-  php clear_stats.php
+  php clearCacheStats.php
   
 The following parameters are available to all maintenance scripts
 --help   : Print a help message
 --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.
@@ -39,16 +42,16 @@ class DemoMaint extends Maintenance {
     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