Use Maintenance::addDescription

It is better to use a setter function than setting a property

Change-Id: I173b3f4af54cf8f6427895e1e170ec97e10d4f3d
This commit is contained in:
Umherirrender 2019-08-19 19:03:36 +02:00
parent 44b952b43a
commit 19e6d4d902
3 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ require_once "$IP/maintenance/Maintenance.php";
class CountFancyCaptchas extends Maintenance { class CountFancyCaptchas extends Maintenance {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
$this->mDescription = "Counts the number of fancy aptchas in storage"; $this->addDescription( "Counts the number of fancy aptchas in storage" );
$this->requireExtension( "FancyCaptcha" ); $this->requireExtension( "FancyCaptcha" );
} }

View file

@ -36,7 +36,7 @@ require_once "$IP/maintenance/Maintenance.php";
class DeleteOldFancyCaptchas extends Maintenance { class DeleteOldFancyCaptchas extends Maintenance {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
$this->mDescription = "Deletes old fancy captchas from storage"; $this->addDescription( "Deletes old fancy captchas from storage" );
$this->addOption( $this->addOption(
"date", "date",
'Delete fancy captchas that were created before this date (e.g. 20170101000000)', 'Delete fancy captchas that were created before this date (e.g. 20170101000000)',

View file

@ -52,7 +52,7 @@ class GenerateFancyCaptchas extends Maintenance {
$this->addOption( "delete", "Delete the old captches" ); $this->addOption( "delete", "Delete the old captches" );
$this->addOption( "threads", "The number of threads to use to generate the images", $this->addOption( "threads", "The number of threads to use to generate the images",
false, true ); false, true );
$this->mDescription = "Generate new fancy captchas and move them into storage"; $this->addDescription( "Generate new fancy captchas and move them into storage" );
$this->requireExtension( "FancyCaptcha" ); $this->requireExtension( "FancyCaptcha" );
} }