From: Robert Leverington Date: Mon, 31 Mar 2008 13:10:58 +0000 (+0000) Subject: Remove $request parameter from saveUserGroups function, update documentation for... X-Git-Tag: 1.31.0-rc.0~48719 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=3295360beecefe548bb07d6c72df028e8ef16995;p=lhc%2Fweb%2Fwiklou.git Remove $request parameter from saveUserGroups function, update documentation for saveUserGroups function and increment $wgStyleVersion by one. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 6977b8bdd7..e261cc0c1e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1324,7 +1324,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '127'; +$wgStyleVersion = '128'; # Server-side caching: diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index 8d23aead95..e90b55cdae 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -97,7 +97,6 @@ class UserrightsPage extends SpecialPage { if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $this->mTarget ) ) { $this->saveUserGroups( $this->mTarget, - $wgRequest, $reason ); } @@ -115,13 +114,11 @@ class UserrightsPage extends SpecialPage { * Data comes from the editUserGroupsForm() form function * * @param string $username Username to apply changes to. - * @param array $removegroup id of groups to be removed. - * @param array $addgroup id of groups to be added. * @param string $reason Reason for group change * @return null */ - function saveUserGroups( $username, $request, $reason = '') { - global $wgUser, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf; + function saveUserGroups( $username, $reason = '') { + global $wgRequest, $wgUser, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf; $user = $this->fetchUser( $username ); if( !$user ) { @@ -137,7 +134,7 @@ class UserrightsPage extends SpecialPage { foreach ($allgroups as $group) { // We'll tell it to remove all unchecked groups, and add all checked groups. // Later on, this gets filtered for what can actually be removed - if ($request->getCheck( "wpGroup-$group" )) { + if ($wgRequest->getCheck( "wpGroup-$group" )) { $addgroup[] = $group; } else { $removegroup[] = $group; @@ -189,7 +186,6 @@ class UserrightsPage extends SpecialPage { if( $newGroups != $oldGroups ) { $log = new LogPage( 'rights' ); - global $wgRequest; $log->addEntry( 'rights', $user->getUserPage(), $wgRequest->getText( 'user-reason' ),