r92205 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92204‎ | r92205 | r92206 >
Date:21:56, 14 July 2011
Author:robin
Status:reverted
Tags:
Comment:
Use Linker::link*() functions
Modified paths:
  • /trunk/extensions/WikimediaIncubator/SpecialViewUserLang.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaIncubator/SpecialViewUserLang.php
@@ -67,8 +67,7 @@
6868 * @param $target Mixed: user whose language and test wiki we're looking up
6969 */
7070 function showInfo( $target ) {
71 - global $wgOut, $wmincPref, $wmincProjectSite, $wgUser;
72 - $sk = $wgUser->getSkin();
 71+ global $wgOut, $wmincPref, $wmincProjectSite;
7372 $user = User::newFromName( $target );
7473 $name = $user->getName();
7574 $id = $user->getId();
@@ -78,11 +77,11 @@
7978 $wgOut->addHTML( Xml::span( wfMsg( 'wminc-userdoesnotexist', $target ), 'error' ) );
8079 } else {
8180 $userproject = $user->getOption( $wmincPref . '-project' );
82 - $userproject = ($userproject ? $userproject : 'none');
 81+ $userproject = ( $userproject ? $userproject : 'none' );
8382 $usercode = $user->getOption( $wmincPref . '-code' );
8483 $prefix = IncubatorTest::displayPrefix( $userproject, $usercode );
8584 if ( IncubatorTest::isContentProject( $userproject ) ) {
86 - $testwiki = $sk->link( Title::newFromText( $prefix ) );
 85+ $testwiki = Linker::link( Title::newFromText( $prefix ) );
8786 } elseif ( $prefix == $wmincProjectSite['short'] ) {
8887 $testwiki = htmlspecialchars( $wmincProjectSite['name'] );
8988 } else {
@@ -91,7 +90,7 @@
9291 $wgOut->addHtml(
9392 Xml::openElement( 'ul' ) .
9493 '<li>' . wfMsgHtml( 'username' ) . ' ' .
95 - $sk->userLink( $id, $name ) . $sk->userToolLinks( $id, $name, true ) . '</li>' .
 94+ Linker::userLink( $id, $name ) . Linker::userToolLinks( $id, $name, true ) . '</li>' .
9695 '<li>' . wfMsgHtml( 'loginlanguagelabel', $langNames[$user->getOption( 'language' )] .
9796 ' (' . $user->getOption( 'language' ) . ')' ) . '</li>' .
9897 '<li>' . wfMsgHtml( 'wminc-testwiki' ) . ' ' . $testwiki . '</li>' .

Follow-up revisions

RevisionCommit summaryAuthorDate
r92553Revert self r92205 because that broke compatibility with 1.17; plus some form...robin19:06, 19 July 2011

Status & tagging log