From 73ae67c6ed1638bb062202e5bc2a034e3bc1b2ae Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 4 Aug 2012 20:31:42 +0200 Subject: [PATCH] Improve documentation of maintenance scripts. Change-Id: I557f85e8526a3e4b48107fbf299ff39f6af1ac12 --- maintenance/mwdoc-filter.php | 16 +++++++++++----- maintenance/protect.php | 10 ++++++++-- maintenance/pruneFileCache.php | 8 +++++++- maintenance/purgeDeletedFiles.php | 11 +++++++++-- maintenance/purgeList.php | 6 ++++++ maintenance/purgeOldText.php | 6 ++++++ maintenance/purgeParserCache.php | 15 ++++++++++----- 7 files changed, 57 insertions(+), 15 deletions(-) diff --git a/maintenance/mwdoc-filter.php b/maintenance/mwdoc-filter.php index 75290f4ff4..ab05a3e24c 100644 --- a/maintenance/mwdoc-filter.php +++ b/maintenance/mwdoc-filter.php @@ -1,9 +1,15 @@ 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' ); diff --git a/maintenance/pruneFileCache.php b/maintenance/pruneFileCache.php index f1a1cfd44c..782804958d 100644 --- a/maintenance/pruneFileCache.php +++ b/maintenance/pruneFileCache.php @@ -1,6 +1,6 @@ getRepo()->getSlaveDB(); - $res = $db->select( 'filearchive', + $res = $db->select( 'filearchive', array( 'fa_archive_name' ), array( 'fa_name' => $file->getName() ), __METHOD__ diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index f1452bca9d..049d6e3e5f 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -17,11 +17,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 sends purge requests for listed pages to squid. + * + * @ingroup Maintenance + */ class PurgeList extends Maintenance { public function __construct() { parent::__construct(); diff --git a/maintenance/purgeOldText.php b/maintenance/purgeOldText.php index 0cbc724e65..e68047c00d 100644 --- a/maintenance/purgeOldText.php +++ b/maintenance/purgeOldText.php @@ -17,12 +17,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * + * @file * @ingroup Maintenance * @author Rob Church */ 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(); diff --git a/maintenance/purgeParserCache.php b/maintenance/purgeParserCache.php index 84a2b51e73..b56794bab1 100644 --- a/maintenance/purgeParserCache.php +++ b/maintenance/purgeParserCache.php @@ -1,6 +1,6 @@ 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 ); } -- 2.20.1