Improve documentation of maintenance scripts.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 4 Aug 2012 18:31:42 +0000 (20:31 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sun, 5 Aug 2012 10:00:37 +0000 (12:00 +0200)
Change-Id: I557f85e8526a3e4b48107fbf299ff39f6af1ac12

maintenance/mwdoc-filter.php
maintenance/protect.php
maintenance/pruneFileCache.php
maintenance/purgeDeletedFiles.php
maintenance/purgeList.php
maintenance/purgeOldText.php
maintenance/purgeParserCache.php

index 75290f4..ab05a3e 100644 (file)
@@ -1,9 +1,15 @@
 <?php
-# Original source code by Goran Rakic
-# http://blog.goranrakic.com/
-# http://stackoverflow.com/questions/4325224
-
-# Should be filled in doxygen INPUT_FILTER as "php mwdoc-filter.php"
+/**
+ * Doxygen filter to show correct member variable types in documentation.
+ *
+ * Should be filled in doxygen INPUT_FILTER as "php mwdoc-filter.php"
+ *
+ * Original source code by Goran Rakic
+ * http://blog.goranrakic.com/
+ * http://stackoverflow.com/questions/4325224
+ *
+ * @file
+ */
 
 $source = file_get_contents( $argv[1] );
 $regexp = '#\@var\s+([^\s]+)([^/]+)/\s+(var|public|protected|private)\s+(\$[^\s;=]+)#';
index e772d67..e60ee08 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Protect or unprotect an article.
+ * Protect or unprotect a page.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script that protects or unprotects a page.
+ *
+ * @ingroup Maintenance
+ */
 class Protect extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Protect or unprotect an article from the command line.";
+               $this->mDescription = "Protect or unprotect a page from the command line.";
                $this->addOption( 'unprotect', 'Removes protection' );
                $this->addOption( 'semiprotect', 'Adds semi-protection' );
                $this->addOption( 'cascade', 'Add cascading protection' );
index f1a1cfd..7828049 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Prune file cache for pages, objects, resources, ect...
+ * Prune file cache for pages, objects, resources, etc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script that prunes file cache for pages, objects, resources, etc.
+ *
+ * @ingroup Maintenance
+ */
 class PruneFileCache extends Maintenance {
 
        protected $minSurviveTimestamp;
index c8d4fc0..e9d149b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Scans the deletion log and purges affected files within a timeframe.
+ * Scan the deletion log and purges affected files within a timeframe.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script that scans the deletion log and purges affected files
+ * within a timeframe.
+ *
+ * @ingroup Maintenance
+ */
 class PurgeDeletedFiles extends Maintenance {
        public function __construct() {
                parent::__construct();
@@ -74,7 +81,7 @@ class PurgeDeletedFiles extends Maintenance {
 
        protected function purgeFromArchiveTable( LocalFile $file ) {
                $db = $file->getRepo()->getSlaveDB();
-               $res = $db->select( 'filearchive', 
+               $res = $db->select( 'filearchive',
                        array( 'fa_archive_name' ),
                        array( 'fa_name' => $file->getName() ),
                        __METHOD__
index f1452bc..049d6e3 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script that sends purge requests for listed pages to squid.
+ *
+ * @ingroup Maintenance
+ */
 class PurgeList extends Maintenance {
        public function __construct() {
                parent::__construct();
index 0cbc724..e68047c 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  * @author Rob Church <robchur@gmail.com>
  */
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script that purges old text records from the database.
+ *
+ * @ingroup Maintenance
+ */
 class PurgeOldText extends Maintenance {
        public function __construct() {
                parent::__construct();
index 84a2b51..b56794b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Maintenance script to remove old objects from the parser cache.
+ * Remove old objects from the parser cache.
  * This only works when the parser cache is in an SQL database.
  *
  * This program is free software; you can redistribute it and/or modify
 
 require( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script to remove old objects from the parser cache.
+ *
+ * @ingroup Maintenance
+ */
 class PurgeParserCache extends Maintenance {
        var $lastProgress;
 
        function __construct() {
                parent::__construct();
-               $this->addDescription( "Remove old objects from the parser cache. " . 
+               $this->addDescription( "Remove old objects from the parser cache. " .
                        "This only works when the parser cache is in an SQL database." );
                $this->addOption( 'expiredate', 'Delete objects expiring before this date.', false, true );
-               $this->addOption( 'age', 
-                       'Delete objects created more than this many seconds ago, assuming $wgParserCacheExpireTime '.
-                               'has been consistent.', 
+               $this->addOption( 'age',
+                       'Delete objects created more than this many seconds ago, assuming $wgParserCacheExpireTime ' .
+                               'has been consistent.',
                        false, true );
        }