Merge "Handle proxy-based TLS when placed in front of Swift"
[lhc/web/wiklou.git] / docs / maintenance.txt
index d46d12e..87071f2 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.
@@ -31,7 +34,7 @@ In it, write the following:
 
 <?php
 
-require_once( "Maintenance.php" );
+require_once 'Maintenance.php';
 
 class DemoMaint extends Maintenance {
 
@@ -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
+https://doc.wikimedia.org/mediawiki-core/master/php/html/classMaintenance.html