jenkins-bot has submitted this change and it was merged.
Change subject: API: Add text for Unknown error: "permissiondenied"
......................................................................
API: Add text for Unknown error: "permissiondenied"
The api does not known a generic "permissiondenied" message.
Change-Id: I65822c9f58ce323352db759d46bf11d4ddab14bd
---
M api/ApiAbuseFilterCheckMatch.php
M api/ApiAbuseFilterCheckSyntax.php
2 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/ApiAbuseFilterCheckMatch.php b/api/ApiAbuseFilterCheckMatch.php
index 5490cc9..7f62792 100644
--- a/api/ApiAbuseFilterCheckMatch.php
+++ b/api/ApiAbuseFilterCheckMatch.php
@@ -7,7 +7,7 @@
// "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 @@
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 379253e..5b89eeb 100644
--- a/api/ApiAbuseFilterCheckSyntax.php
+++ b/api/ApiAbuseFilterCheckSyntax.php
@@ -5,7 +5,7 @@
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 @@
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' ),
) );
}
--
To view, visit https://gerrit.wikimedia.org/r/92191
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I65822c9f58ce323352db759d46bf11d4ddab14bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Johnduhart <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits