From 6d29388a2a48c0dd0ba4f8dc620d6106f807288e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 2 Sep 2009 15:58:49 +0000 Subject: [PATCH] * (bug 20446) When changing user rights with User@remotewiki and remotewiki is the local wiki, the user is now treated as the local user --- RELEASE-NOTES | 2 ++ includes/specials/SpecialUserrights.php | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c9a08d9ddf..1234eb707b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -452,6 +452,8 @@ this. Was used when mwEmbed was going to be an extension. * (bug 14900) __INDEX__ and __NOINDEX__ no longer override site config set in $wgArticleRobotPolicies. * (bug 20466) Hidden categories are no more displayed when printing +* (bug 20446) When changing user rights with User@remotewiki and remotewiki is + the local wiki, the user is now treated as the local user == API changes in 1.16 == diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 409b3f19f2..10c5dd34f8 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -281,12 +281,16 @@ class UserrightsPage extends SpecialPage { $database = ''; } else { list( $name, $database ) = array_map( 'trim', $parts ); - - if( !$wgUser->isAllowed( 'userrights-interwiki' ) ) { - return new WikiErrorMsg( 'userrights-no-interwiki' ); - } - if( !UserRightsProxy::validDatabase( $database ) ) { - return new WikiErrorMsg( 'userrights-nodatabase', $database ); + + if( $database == wfWikiID() ) { + $database = ''; + } else { + if( !$wgUser->isAllowed( 'userrights-interwiki' ) ) { + return new WikiErrorMsg( 'userrights-no-interwiki' ); + } + if( !UserRightsProxy::validDatabase( $database ) ) { + return new WikiErrorMsg( 'userrights-nodatabase', $database ); + } } } -- 2.20.1