diff --git a/api/ApiAbuseFilterCheckMatch.php b/api/ApiAbuseFilterCheckMatch.php index 5490cc9e5..7f6279265 100644 --- a/api/ApiAbuseFilterCheckMatch.php +++ b/api/ApiAbuseFilterCheckMatch.php @@ -7,7 +7,7 @@ class ApiAbuseFilterCheckMatch extends ApiBase { // "Anti-DoS" if ( !$this->getUser()->isAllowed( 'abusefilter-modify' ) ) { - $this->dieUsageMsg( 'permissiondenied' ); + $this->dieUsage( 'You don\'t have permission to test abuse filters', 'permissiondenied' ); } if ( $params['vars'] ) { @@ -93,7 +93,7 @@ class ApiAbuseFilterCheckMatch extends ApiBase { return array_merge( parent::getPossibleErrors(), $this->getRequireOnlyOneParameterErrorMessages( array( 'vars', 'rcid', 'logid' ) ), array( - array( 'permissiondenied' ), + array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to test abuse filters' ), array( 'nosuchrcid' ), array( 'code' => 'nosuchlogid', 'info' => 'There is no abuselog entry with the id given' ), array( 'code' => 'badsyntax', 'info' => 'The filter has invalid syntax' ), diff --git a/api/ApiAbuseFilterCheckSyntax.php b/api/ApiAbuseFilterCheckSyntax.php index 379253ea2..5b89eeb1d 100644 --- a/api/ApiAbuseFilterCheckSyntax.php +++ b/api/ApiAbuseFilterCheckSyntax.php @@ -5,7 +5,7 @@ class ApiAbuseFilterCheckSyntax extends ApiBase { public function execute() { // "Anti-DoS" if ( !$this->getUser()->isAllowed( 'abusefilter-modify' ) ) { - $this->dieUsageMsg( 'permissiondenied' ); + $this->dieUsage( 'You don\'t have permission to check syntax of abuse filters', 'permissiondenied' ); } $params = $this->extractRequestParams(); @@ -48,7 +48,7 @@ class ApiAbuseFilterCheckSyntax extends ApiBase { public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( - array( 'permissiondenied' ), + array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to check syntax of abuse filters' ), ) ); }