X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmakeTestEdits.php;h=ca2f7c51c985404f8fcc49586b29efcbe77d76da;hb=501fee469e748a0e771aab921bb64db52f0f4fd5;hp=fdf4eb9daf2134574497cb669b2d5852e629cbe2;hpb=5a1a4c9a4021b912aa9e55dc92b91599aa4d9e3c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/makeTestEdits.php b/maintenance/makeTestEdits.php index fdf4eb9daf..ca2f7c51c9 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 ); @@ -39,7 +39,7 @@ class MakeTestEdits extends Maintenance { public function execute() { $user = User::newFromName( $this->getOption( 'user' ) ); - if ( !$user ) { + if ( !$user->getId() ) { $this->error( "No such user exists.", 1 ); }