X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmakeTestEdits.php;h=cfd5fc28a5e312155345b8bb3adef13e099cc02d;hb=cce016b4a4cb04611657e3d3299cba94f2e354d2;hp=c6569a0b317f3c13a2f8f8ac649008ef1243aa98;hpb=4618f70793d1178ca4c646ef397cf17b1cc70b44;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(); } }