X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=blobdiff_plain;f=maintenance%2FmakeTestEdits.php;h=cfd5fc28a5e312155345b8bb3adef13e099cc02d;hb=bd83a8ca88447ab9dcb2e2a1c8be2cf2ec64157f;hp=c6569a0b317f3c13a2f8f8ac649008ef1243aa98;hpb=ea9fcc1e4d3b572199d82c426024e3e5efe23879;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/makeTestEdits.php b/maintenance/makeTestEdits.php index c6569a0b31..cfd5fc28a5 100644 --- a/maintenance/makeTestEdits.php +++ b/maintenance/makeTestEdits.php @@ -30,7 +30,7 @@ require_once __DIR__ . '/Maintenance.php'; class MakeTestEdits extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Make test edits for a user"; + $this->addDescription( 'Make test edits for a user' ); $this->addOption( 'user', 'User name', true, true ); $this->addOption( 'count', 'Number of edits', true, true ); $this->addOption( 'namespace', 'Namespace number', false, true ); @@ -40,7 +40,7 @@ class MakeTestEdits extends Maintenance { public function execute() { $user = User::newFromName( $this->getOption( 'user' ) ); if ( !$user->getId() ) { - $this->error( "No such user exists.", 1 ); + $this->fatalError( "No such user exists." ); } $count = $this->getOption( 'count' ); @@ -55,7 +55,7 @@ class MakeTestEdits extends Maintenance { $page->doEditContent( $content, $summary, 0, false, $user ); $this->output( "Edited $title\n" ); - if ( $i && ( $i % $this->mBatchSize ) == 0 ) { + if ( $i && ( $i % $this->getBatchSize() ) == 0 ) { wfWaitForSlaves(); } }