From: Alexandre Emsenhuber Date: Sat, 4 Aug 2012 18:31:42 +0000 (+0200) Subject: Improve documentation of maintenance scripts. X-Git-Tag: 1.31.0-rc.0~22844 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=73ae67c6ed1638bb062202e5bc2a034e3bc1b2ae;p=lhc%2Fweb%2Fwiklou.git Improve documentation of maintenance scripts. Change-Id: I557f85e8526a3e4b48107fbf299ff39f6af1ac12 --- 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 ); }