summaryrefslogtreecommitdiff
path: root/includes/api/ApiUserrights.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiUserrights.php')
-rw-r--r--includes/api/ApiUserrights.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php
index 74948ce0..191dd3ec 100644
--- a/includes/api/ApiUserrights.php
+++ b/includes/api/ApiUserrights.php
@@ -25,11 +25,6 @@
* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- // Eclipse helper - will be ignored in production
- require_once( "ApiBase.php" );
-}
-
/**
* @ingroup API
*/
@@ -44,7 +39,7 @@ class ApiUserrights extends ApiBase {
public function execute() {
$params = $this->extractRequestParams();
- $user = $this->getUser();
+ $user = $this->getUrUser();
$form = new UserrightsPage;
$r['user'] = $user->getName();
@@ -62,7 +57,7 @@ class ApiUserrights extends ApiBase {
/**
* @return User
*/
- private function getUser() {
+ private function getUrUser() {
if ( $this->mUser !== null ) {
return $this->mUser;
}
@@ -130,10 +125,10 @@ class ApiUserrights extends ApiBase {
}
public function getTokenSalt() {
- return $this->getUser()->getName();
+ return $this->getUrUser()->getName();
}
- protected function getExamples() {
+ public function getExamples() {
return array(
'api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC'
);