Follow up r57846: tack on an error code

This commit is contained in:
Aaron Schulz 2009-10-17 05:06:41 +00:00
parent 60660e2af3
commit 9be4e7686c

View file

@ -1,3 +1,4 @@
<?php
/*
@ -61,7 +62,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
if (!is_null($params['owner']) && !is_null($params['token'])) {
$user = User::newFromName($params['owner'],false);
if( !$user->getId() ) {
$this->dieUsage( 'Specified user does not exist' );
$this->dieUsage( 'Specified user does not exist', 'bad_wlowner' );
}
$token = $user->getOption('watchlisttoken');
if ($token == '' || $token != $params['token']) {