X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiTag.php;h=f6c05845478453e4c9285a759dfb6c01cc4e15c0;hp=f88c2dbc62f2dd3d7d5496f3d619be9f085e7bde;hb=ce079cf6ad79ca8d3360817f809b219d166f9153;hpb=32628487e17c27f3437d44bd54edb8438e837b82 diff --git a/includes/api/ApiTag.php b/includes/api/ApiTag.php index f88c2dbc62..f6c0584547 100644 --- a/includes/api/ApiTag.php +++ b/includes/api/ApiTag.php @@ -30,10 +30,7 @@ class ApiTag extends ApiBase { $user = $this->getUser(); // make sure the user is allowed - if ( !$user->isAllowed( 'changetags' ) ) { - $this->dieUsage( "You don't have permission to add or remove change tags from individual edits", - 'permissiondenied' ); - } + $this->checkUserRightsAny( 'changetags' ); if ( $user->isBlocked() ) { $this->dieBlocked( $user->getBlock() ); @@ -88,7 +85,8 @@ class ApiTag extends ApiBase { if ( !$valid ) { $idResult['status'] = 'error'; - $idResult += $this->parseMsg( [ "nosuch$type", $id ] ); + // Messages: apierror-nosuchrcid apierror-nosuchrevid apierror-nosuchlogid + $idResult += $this->getErrorFormatter()->formatMessage( [ "apierror-nosuch$type", $id ] ); return $idResult; }