X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUserrights.php;h=4168d9185421192d45e956eb355ae1aeb5d6661f;hb=acd7881d5fe6afd87a3bd0d7d9f40ece82b48c3f;hp=42051886f7bb8f034781d1f1c2ca7b2b4176e3c5;hpb=a075f50a86be14347100f662ccd683af4f437090;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php
index 42051886f7..4168d91854 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -160,7 +160,7 @@ class UserrightsPage extends SpecialPage {
// save settings
if ( !$fetchedStatus->isOK() ) {
- $this->getOutput()->addWikiText( $fetchedStatus->getWikiText() );
+ $this->getOutput()->addWikiTextAsInterface( $fetchedStatus->getWikiText() );
return;
}
@@ -189,7 +189,7 @@ class UserrightsPage extends SpecialPage {
return;
} else {
// Print an error message and redisplay the form
- $out->addWikiText( '
' . $status->getWikiText() . '
' );
+ $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() );
}
}
}
@@ -468,7 +468,7 @@ class UserrightsPage extends SpecialPage {
function editUserGroupsForm( $username ) {
$status = $this->fetchUser( $username, true );
if ( !$status->isOK() ) {
- $this->getOutput()->addWikiText( $status->getWikiText() );
+ $this->getOutput()->addWikiTextAsInterface( $status->getWikiText() );
return;
} else {
@@ -497,18 +497,18 @@ class UserrightsPage extends SpecialPage {
$parts = explode( $this->getConfig()->get( 'UserrightsInterwikiDelimiter' ), $username );
if ( count( $parts ) < 2 ) {
$name = trim( $username );
- $database = '';
+ $wikiId = '';
} else {
- list( $name, $database ) = array_map( 'trim', $parts );
+ list( $name, $wikiId ) = array_map( 'trim', $parts );
- if ( $database == wfWikiID() ) {
- $database = '';
+ if ( WikiMap::isCurrentWikiId( $wikiId ) ) {
+ $wikiId = '';
} else {
if ( $writing && !$this->getUser()->isAllowed( 'userrights-interwiki' ) ) {
return Status::newFatal( 'userrights-no-interwiki' );
}
- if ( !UserRightsProxy::validDatabase( $database ) ) {
- return Status::newFatal( 'userrights-nodatabase', $database );
+ if ( !UserRightsProxy::validDatabase( $wikiId ) ) {
+ return Status::newFatal( 'userrights-nodatabase', $wikiId );
}
}
}
@@ -522,10 +522,10 @@ class UserrightsPage extends SpecialPage {
// We'll do a lookup for the name internally.
$id = intval( substr( $name, 1 ) );
- if ( $database == '' ) {
+ if ( $wikiId == '' ) {
$name = User::whoIs( $id );
} else {
- $name = UserRightsProxy::whoIs( $database, $id );
+ $name = UserRightsProxy::whoIs( $wikiId, $id );
}
if ( !$name ) {
@@ -539,10 +539,10 @@ class UserrightsPage extends SpecialPage {
}
}
- if ( $database == '' ) {
+ if ( $wikiId == '' ) {
$user = User::newFromName( $name );
} else {
- $user = UserRightsProxy::newFromName( $database, $name );
+ $user = UserRightsProxy::newFromName( $wikiId, $name );
}
if ( !$user || $user->isAnon() ) {
@@ -767,7 +767,7 @@ class UserrightsPage extends SpecialPage {
* @param UserGroupMembership[] $usergroups Associative array of (group name as string =>
* UserGroupMembership object) for groups the user belongs to
* @param User $user
- * @return Array with 2 elements: the XHTML table element with checkxboes, and
+ * @return array Array with 2 elements: the XHTML table element with checkxboes, and
* whether any groups are changeable
*/
private function groupCheckboxes( $usergroups, $user ) {