summaryrefslogtreecommitdiff
path: root/includes/api/ApiUserrights.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/api/ApiUserrights.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
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'
);