* (bug 20115) Special:Userlogin title says "Log in / create account" even if the
user can't create an account
* (bug 2658) Don't attempt to set the TZ environment variable.
+* (bug 9794) User rights log entries for foreign user now links to the foreign
+ user's page if possible
== API changes in 1.16 ==
}
protected static function getTitleLink( $type, $skin, $title, &$params ) {
- global $wgLang, $wgContLang;
+ global $wgLang, $wgContLang, $wgUserrightsInterwikiDelimiter;
if( !$skin ) {
return $title->getPrefixedText();
}
break;
case 'rights':
$text = $wgContLang->ucfirst( $title->getText() );
+ $parts = explode( $wgUserrightsInterwikiDelimiter, $text, 2 );
+ if ( count( $parts ) == 2 ) {
+ $titleLink = WikiMap::foreignUserLink( $parts[1], $parts[0],
+ htmlspecialchars( $title->getPrefixedText() ) );
+ if ( $titleLink !== false )
+ break;
+ }
$titleLink = $skin->link( Title::makeTitle( NS_USER, $text ) );
break;
case 'merge':
return $wiki_id;
}
- static function foreignUserLink( $wiki_id, $user ) {
- return self::makeForeignLink( $wiki_id, "User:$user" );
+ static function foreignUserLink( $wiki_id, $user, $text=null ) {
+ return self::makeForeignLink( $wiki_id, "User:$user", $text );
}
static function makeForeignLink( $wiki_id, $page, $text=null ) {
global $wgUser;
$sk = $wgUser->getSkin();
-
- if (!$text)
+
+ if ( !$text )
$text=$page;
-
- return $sk->makeExternalLink( self::getForeignURL( $wiki_id, $page ) , $text );
+
+ $url = self::getForeignURL( $wiki_id, $page );
+ if ( $url === false )
+ return false;
+
+ return $sk->makeExternalLink( $url, $text );
}
static function getForeignURL( $wiki_id, $page ) {