From e9d31f5949e9d6b676bbb44d85d3bce9bff69225 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 2 Aug 2012 21:33:47 +0200 Subject: [PATCH] Improve documentation of maintenance scripts. Change-Id: I52ebe4d741109aef19cd8fa252243e2b6440565f --- maintenance/parse.php | 25 ++++++++++++++++++++++++- maintenance/patchSql.php | 6 ++++++ maintenance/populateCategory.php | 8 ++++++-- maintenance/populateImageSha1.php | 6 ++++++ maintenance/populateLogSearch.php | 7 +++++++ maintenance/populateLogUsertext.php | 7 +++++++ maintenance/populateParentId.php | 7 +++++++ maintenance/populateRevisionLength.php | 7 +++++++ maintenance/populateRevisionSha1.php | 7 +++++++ maintenance/preprocessDump.php | 10 ++++++++-- 10 files changed, 85 insertions(+), 5 deletions(-) diff --git a/maintenance/parse.php b/maintenance/parse.php index 464de10313..c1a890bdf1 100644 --- a/maintenance/parse.php +++ b/maintenance/parse.php @@ -1,6 +1,7 @@ $ * @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 * @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; diff --git a/maintenance/patchSql.php b/maintenance/patchSql.php index 1f96d62cc3..0271e1a5ec 100644 --- a/maintenance/patchSql.php +++ b/maintenance/patchSql.php @@ -18,11 +18,17 @@ * 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(); diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index 0b45493eb1..037849bd3c 100644 --- a/maintenance/populateCategory.php +++ b/maintenance/populateCategory.php @@ -1,6 +1,6 @@ 'revision', 'fa' => 'filearchive', 'oi' => 'oldimage', 'ar' => 'archive' ); diff --git a/maintenance/populateLogUsertext.php b/maintenance/populateLogUsertext.php index eaac68c67c..3b4b2db8a1 100644 --- a/maintenance/populateLogUsertext.php +++ b/maintenance/populateLogUsertext.php @@ -20,11 +20,18 @@ * 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(); diff --git a/maintenance/populateParentId.php b/maintenance/populateParentId.php index b6d20671d3..6a1b5c850f 100644 --- a/maintenance/populateParentId.php +++ b/maintenance/populateParentId.php @@ -19,11 +19,18 @@ * 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(); diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index 6626cbc1c5..65dd91f974 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -17,11 +17,18 @@ * 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(); diff --git a/maintenance/populateRevisionSha1.php b/maintenance/populateRevisionSha1.php index 1d8e4c8ba6..bb620c527a 100644 --- a/maintenance/populateRevisionSha1.php +++ b/maintenance/populateRevisionSha1.php @@ -18,11 +18,18 @@ * 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(); diff --git a/maintenance/preprocessDump.php b/maintenance/preprocessDump.php index ad9b4f14df..5c2b0d42fa 100644 --- a/maintenance/preprocessDump.php +++ b/maintenance/preprocessDump.php @@ -1,10 +1,10 @@