Index: trunk/extensions/WikimediaIncubator/SpecialViewUserLang.php |
— | — | @@ -67,11 +67,12 @@ |
68 | 68 | * @param $target Mixed: user whose language and test wiki we're looking up |
69 | 69 | */ |
70 | 70 | function showInfo( $target ) { |
71 | | - global $wgOut, $wmincPref, $wmincProjectSite, $wgUser; |
| 71 | + global $wgOut, $wmincPref, $wmincProjectSite; |
72 | 72 | $user = User::newFromName( $target ); |
73 | 73 | $name = $user->getName(); |
74 | 74 | $id = $user->getId(); |
75 | 75 | $langNames = Language::getLanguageNames(); |
| 76 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
76 | 77 | if ( $user == null || $id == 0 ) { |
77 | 78 | // show error if a user with that name does not exist |
78 | 79 | $wgOut->addHTML( Xml::span( wfMsg( 'wminc-userdoesnotexist', $target ), 'error' ) ); |
— | — | @@ -81,7 +82,7 @@ |
82 | 83 | $usercode = $user->getOption( $wmincPref . '-code' ); |
83 | 84 | $prefix = IncubatorTest::displayPrefix( $userproject, $usercode ); |
84 | 85 | if ( IncubatorTest::isContentProject( $userproject ) ) { |
85 | | - $testwiki = $wgUser->getSkin()->link( Title::newFromText( $prefix ) ); |
| 86 | + $testwiki = $linker->link( Title::newFromText( $prefix ) ); |
86 | 87 | } elseif ( $prefix == $wmincProjectSite['short'] ) { |
87 | 88 | $testwiki = htmlspecialchars( $wmincProjectSite['name'] ); |
88 | 89 | } else { |
— | — | @@ -90,7 +91,7 @@ |
91 | 92 | $wgOut->addHtml( |
92 | 93 | Xml::openElement( 'ul' ) . |
93 | 94 | '<li>' . wfMsgHtml( 'username' ) . ' ' . |
94 | | - $wgUser->getSkin()->userLink( $id, $name ) . $wgUser->getSkin()->userToolLinks( $id, $name, true ) . '</li>' . |
| 95 | + $linker->userLink( $id, $name ) . $linker->userToolLinks( $id, $name, true ) . '</li>' . |
95 | 96 | '<li>' . wfMsgHtml( 'loginlanguagelabel', $langNames[$user->getOption( 'language' )] . |
96 | 97 | ' (' . $user->getOption( 'language' ) . ')' ) . '</li>' . |
97 | 98 | '<li>' . wfMsgHtml( 'wminc-testwiki' ) . ' ' . $testwiki . '</li>' . |
Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php |
— | — | @@ -431,7 +431,7 @@ |
432 | 432 | * @return True |
433 | 433 | */ |
434 | 434 | static function onShowMissingArticle( $article ) { |
435 | | - global $wgOut, $wgUser; |
| 435 | + global $wgOut; |
436 | 436 | $title = $article->getTitle(); |
437 | 437 | $prefix = self::analyzePrefix( $title->getText(), true /* only info pages */ ); |
438 | 438 | |
— | — | @@ -447,7 +447,8 @@ |
448 | 448 | return true; |
449 | 449 | } else { |
450 | 450 | # Show a link to the existing wiki |
451 | | - $showLink = $wgUser->getSkin()->makeExternalLink( $link, $link ); |
| 451 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
| 452 | + $showLink = $linker->makeExternalLink( $link, $link ); |
452 | 453 | $wgOut->addHtml( '<div class="wminc-wiki-exists">' . |
453 | 454 | wfMsgHtml( 'wminc-error-wiki-exists', $showLink ) . |
454 | 455 | '</div>' ); |