
roan.kattouw at home
Aug 22, 2008, 1:49 AM
Post #1 of 1
(241 views)
Permalink
|
|
Re: [MediaWiki-CVS] SVN: [39793] trunk/phase3
|
|
btongminh[at]svn.wikimedia.org schreef: > Revision: 39793 > Author: btongminh > Date: 2008-08-21 22:15:34 +0000 (Thu, 21 Aug 2008) > > Log Message: > ----------- > * (bug 13879) Special:EmailUser shows a form in case no user was specified > > Modified: trunk/phase3/includes/api/ApiEmailUser.php > =================================================================== > --- trunk/phase3/includes/api/ApiEmailUser.php 2008-08-21 22:12:31 UTC (rev 39792) > +++ trunk/phase3/includes/api/ApiEmailUser.php 2008-08-21 22:15:34 UTC (rev 39793) > @@ -52,6 +52,8 @@ > > // Validate target > $targetUser = EmailUserForm::validateEmailTarget( $params['target'] ); > + if ( $targetUser === false ) > + $this->dieUsageMsg( array( 'notargettitle' ) ); > if ( !( $targetUser instanceof User ) ) > $this->dieUsageMsg( array( $targetUser[0] ) ); > When you use dieUsageMsg() with a new message, please add that message to ApiBase::$messageMap as well, or the client will get "Unknown error: notargettitle", which isn't very pretty. Roan Kattouw (Catrope) _______________________________________________ Wikitech-l mailing list Wikitech-l[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
|