Index: trunk/phase3/includes/WikiMap.php |
— | — | @@ -33,18 +33,22 @@ |
34 | 34 | return $wiki_id; |
35 | 35 | } |
36 | 36 | |
37 | | - static function foreignUserLink( $wiki_id, $user ) { |
38 | | - return self::makeForeignLink( $wiki_id, "User:$user" ); |
| 37 | + static function foreignUserLink( $wiki_id, $user, $text=null ) { |
| 38 | + return self::makeForeignLink( $wiki_id, "User:$user", $text ); |
39 | 39 | } |
40 | 40 | |
41 | 41 | static function makeForeignLink( $wiki_id, $page, $text=null ) { |
42 | 42 | global $wgUser; |
43 | 43 | $sk = $wgUser->getSkin(); |
44 | | - |
45 | | - if (!$text) |
| 44 | + |
| 45 | + if ( !$text ) |
46 | 46 | $text=$page; |
47 | | - |
48 | | - return $sk->makeExternalLink( self::getForeignURL( $wiki_id, $page ) , $text ); |
| 47 | + |
| 48 | + $url = self::getForeignURL( $wiki_id, $page ); |
| 49 | + if ( $url === false ) |
| 50 | + return false; |
| 51 | + |
| 52 | + return $sk->makeExternalLink( $url, $text ); |
49 | 53 | } |
50 | 54 | |
51 | 55 | static function getForeignURL( $wiki_id, $page ) { |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -291,7 +291,7 @@ |
292 | 292 | } |
293 | 293 | |
294 | 294 | protected static function getTitleLink( $type, $skin, $title, &$params ) { |
295 | | - global $wgLang, $wgContLang; |
| 295 | + global $wgLang, $wgContLang, $wgUserrightsInterwikiDelimiter; |
296 | 296 | if( !$skin ) { |
297 | 297 | return $title->getPrefixedText(); |
298 | 298 | } |
— | — | @@ -327,6 +327,13 @@ |
328 | 328 | break; |
329 | 329 | case 'rights': |
330 | 330 | $text = $wgContLang->ucfirst( $title->getText() ); |
| 331 | + $parts = explode( $wgUserrightsInterwikiDelimiter, $text, 2 ); |
| 332 | + if ( count( $parts ) == 2 ) { |
| 333 | + $titleLink = WikiMap::foreignUserLink( $parts[1], $parts[0], |
| 334 | + htmlspecialchars( $title->getPrefixedText() ) ); |
| 335 | + if ( $titleLink !== false ) |
| 336 | + break; |
| 337 | + } |
331 | 338 | $titleLink = $skin->link( Title::makeTitle( NS_USER, $text ) ); |
332 | 339 | break; |
333 | 340 | case 'merge': |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -691,6 +691,8 @@ |
692 | 692 | * (bug 20115) Special:Userlogin title says "Log in / create account" even if the |
693 | 693 | user can't create an account |
694 | 694 | * (bug 2658) Don't attempt to set the TZ environment variable. |
| 695 | +* (bug 9794) User rights log entries for foreign user now links to the foreign |
| 696 | + user's page if possible |
695 | 697 | |
696 | 698 | == API changes in 1.16 == |
697 | 699 | |