Improve documentation of maintenance scripts.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 2 Aug 2012 19:33:47 +0000 (21:33 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 2 Aug 2012 19:34:23 +0000 (21:34 +0200)
Change-Id: I52ebe4d741109aef19cd8fa252243e2b6440565f

maintenance/parse.php
maintenance/patchSql.php
maintenance/populateCategory.php
maintenance/populateImageSha1.php
maintenance/populateLogSearch.php
maintenance/populateLogUsertext.php
maintenance/populateParentId.php
maintenance/populateRevisionLength.php
maintenance/populateRevisionSha1.php
maintenance/preprocessDump.php

index 464de10..c1a890b 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
- * CLI script to easily parse some wikitext.
+ * Parse some wikitext.
+ *
  * Wikitext can be given by stdin or using a file. The wikitext will be parsed
  * using 'CLIParser' as a title. This can be overriden with --title option.
  *
  * </p>$
  * @endcode
  *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
  * @ingroup Maintenance
  * @author Antoine Musso <hashar at free dot fr>
  * @license GNU General Public License 2.0 or later
  */
+
 require_once( dirname(__FILE__) . '/Maintenance.php' );
 
+/**
+ * Maintenance script to parse some wikitext.
+ *
+ * @ingroup Maintenance
+ */
 class CLIParser extends Maintenance {
        protected $parser;
 
index 1f96d62..0271e1a 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 manually runs an SQL patch outside of the general updaters.
+ *
+ * @ingroup Maintenance
+ */
 class PatchSql extends Maintenance {
        public function __construct() {
                parent::__construct();
index 0b45493..037849b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Script to populate category table.
+ * Populate the category table.
  *
  * 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
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
-
+/**
+ * Mainteance script to populate the category table.
+ *
+ * @ingroup Maintenance
+ */
 class PopulateCategory extends Maintenance {
 
        const REPORTING_INTERVAL = 1000;
index 0847edf..0bbb5a2 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 to populate the img_sha1 field.
+ *
+ * @ingroup Maintenance
+ */
 class PopulateImageSha1 extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
index e3f6067..8a2366a 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 makes the required database updates for populating the
+ * log_search table retroactively
+ *
+ * @ingroup Maintenance
+ */
 class PopulateLogSearch extends LoggedUpdateMaintenance {
        static $tableMap = array( 'rev' => 'revision', 'fa' => 'filearchive', 'oi' => 'oldimage', 'ar' => 'archive' );
 
index eaac68c..3b4b2db 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 makes the required database updates for
+ * Special:ProtectedPages to show all protected pages.
+ *
+ * @ingroup Maintenance
+ */
 class PopulateLogUsertext extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
index b6d2067..6a1b5c8 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 makes the required database updates for rev_parent_id
+ * to be of any use.
+ *
+ * @ingroup Maintenance
+ */
 class PopulateParentId extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
index 6626cbc..65dd91f 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 populates the rev_len field for old revisions
+ * created before MW 1.10.
+ *
+ * @ingroup Maintenance
+ */
 class PopulateRevisionLength extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
index 1d8e4c8..bb620c5 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 fills the rev_sha1 and ar_sha1 columns of revision
+ * and archive tables for revisions created before MW 1.19.
+ *
+ * @ingroup Maintenance
+ */
 class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
index ad9b4f1..5c2b0d4 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 /**
  * Take page text out of an XML dump file and preprocess it to obj.
- * It may be useful for getting preprocessor statistics or filling the 
+ * It may be useful for getting preprocessor statistics or filling the
  * preprocessor cache.
  *
- * Copyright (C) 2011 Platonides - http://www.mediawiki.org/
+ * Copyright © 2011 Platonides - http://www.mediawiki.org/
  *
  * 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
 
 require_once( dirname( __FILE__ ) . '/dumpIterator.php' );
 
+/**
+ * Maintenance script that takes page text out of an XML dump file and
+ * preprocesses it to obj.
+ *
+ * @ingroup Maintenance
+ */
 class PreprocessDump extends DumpIterator {
 
        /* Variables for dressing up as a parser */