From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/specials/SpecialUserrights.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'includes/specials/SpecialUserrights.php') diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index ce0097b2..90619109 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -96,11 +96,18 @@ class UserrightsPage extends SpecialPage { // save settings if( $wgRequest->getCheck( 'saveusergroups' ) ) { $reason = $wgRequest->getVal( 'user-reason' ); - if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $this->mTarget ) ) { + $tok = $wgRequest->getVal( 'wpEditToken' ); + if( $wgUser->matchEditToken( $tok, $this->mTarget ) ) { $this->saveUserGroups( $this->mTarget, $reason ); + + global $wgOut; + + $url = $this->getSuccessURL(); + $wgOut->redirect( $url ); + return; } } } @@ -110,6 +117,10 @@ class UserrightsPage extends SpecialPage { $this->editUserGroupsForm( $this->mTarget ); } } + + function getSuccessURL() { + return $this->getTitle( $this->mTarget )->getFullURL(); + } /** * Save user groups changes in the database. @@ -231,9 +242,9 @@ class UserrightsPage extends SpecialPage { * @return mixed User, UserRightsProxy, or null */ function fetchUser( $username ) { - global $wgOut, $wgUser; + global $wgOut, $wgUser, $wgUserrightsInterwikiDelimiter; - $parts = explode( '@', $username ); + $parts = explode( $wgUserrightsInterwikiDelimiter, $username ); if( count( $parts ) < 2 ) { $name = trim( $username ); $database = ''; -- cgit v1.2.3-54-g00ecf