Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3880
iwfix.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:40 PM
2014-11-21 21:40:21 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
iwfix.patch
View Options
Index: includes/SpecialUserrights.php
===================================================================
--- includes/SpecialUserrights.php (revision 32202)
+++ includes/SpecialUserrights.php (working copy)
@@ -173,10 +173,26 @@
if( $newGroups != $oldGroups ) {
$log = new LogPage( 'rights' );
-
+
+ // Fix for interwiki userrights changes
+ $parts = explode( '@', $username );
+ if( count( $parts ) >= 2 ) {
+ global $wgServer;
+ regex_match( '/^([^@]*)@(.*)$/', $username, $matches );
+ regex_match( '/^(...?)(wik.*)$/', $matches[2], $iwparts );
+ $target = new Title();
+ $target->mInterwiki = ( $iwparts[2] == 'wiki' ) ? 'w' : $iwparts[2];
+ $target->mFragment = '';
+ $target->mNamespace = NS_USER;
+ $target->mUrlform = wfUrlencode( str_replace( ' ', '_', $matches[1] ) );
+ $target->mTextform = str_replace( '_', ' ', $matches[1] );
+ } else {
+ $target = $user->getUserPage();
+ }
+
global $wgRequest;
$log->addEntry( 'rights',
- $user->getUserPage(),
+ $target,
$wgRequest->getText( 'user-reason' ),
array(
$this->makeGroupNameList( $oldGroups ),
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3447
Default Alt Text
iwfix.patch (1 KB)
Attached To
Mode
T11794: Meta rights log should link to user page on affected wiki
Attached
Detach File
Event Timeline
Log In to Comment