Index: trunk/extensions/Translate/specials/SpecialManageGroups.php |
— | — | @@ -20,11 +20,6 @@ |
21 | 21 | */ |
22 | 22 | class SpecialManageGroups extends SpecialPage { |
23 | 23 | /** |
24 | | - * @var Skin |
25 | | - */ |
26 | | - protected $skin; |
27 | | - |
28 | | - /** |
29 | 24 | * @var User |
30 | 25 | */ |
31 | 26 | protected $user; |
— | — | @@ -44,12 +39,12 @@ |
45 | 40 | global $wgOut, $wgUser; |
46 | 41 | $this->out = $wgOut; |
47 | 42 | $this->user = $wgUser; |
48 | | - $this->skin = $wgUser->getSkin(); |
49 | 43 | parent::__construct( 'ManageMessageGroups', 'translate-manage' ); |
50 | 44 | } |
51 | 45 | |
52 | 46 | public function execute( $par ) { |
53 | 47 | global $wgRequest; |
| 48 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
54 | 49 | |
55 | 50 | $this->out->setPageTitle( htmlspecialchars( wfMsg( 'translate-managegroups' ) ) ); |
56 | 51 | |
— | — | @@ -107,7 +102,7 @@ |
108 | 103 | wfDebug( __METHOD__ . ": {$group->getId()}\n" ); |
109 | 104 | |
110 | 105 | $id = $group->getId(); |
111 | | - $link = $this->skin->link( $this->getTitle(), $group->getLabel(), |
| 106 | + $link = $linker->link( $this->getTitle(), $group->getLabel(), |
112 | 107 | array( 'id' => "mw-group-$id" ), array( 'group' => $id ) ); |
113 | 108 | $out = $link . $separator; |
114 | 109 | |
— | — | @@ -406,7 +401,8 @@ |
407 | 402 | if ( $code === 'en' ) { |
408 | 403 | $this->doModLangs( $group ); |
409 | 404 | } else { |
410 | | - $this->out->addHTML( '<p>' . $this->skin->link( |
| 405 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
| 406 | + $this->out->addHTML( '<p>' . $linker->link( |
411 | 407 | $this->getTitle(), |
412 | 408 | wfMsgHtml( 'translate-manage-return-to-group' ), |
413 | 409 | array(), |
— | — | @@ -435,7 +431,8 @@ |
436 | 432 | continue; |
437 | 433 | } |
438 | 434 | |
439 | | - $link = $this->skin->link( |
| 435 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
| 436 | + $link = $linker->link( |
440 | 437 | $this->getTitle(), |
441 | 438 | htmlspecialchars( TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() ) . " ($code)" ), |
442 | 439 | array(), |
— | — | @@ -485,13 +482,14 @@ |
486 | 483 | */ |
487 | 484 | protected function setSubtitle( $group, $code ) { |
488 | 485 | global $wgLang; |
| 486 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
489 | 487 | |
490 | | - $links[] = $this->skin->link( |
| 488 | + $links[] = $linker->link( |
491 | 489 | $this->getTitle(), |
492 | 490 | wfMsgHtml( 'translate-manage-subtitle' ) |
493 | 491 | ); |
494 | 492 | |
495 | | - $links[] = $this->skin->link( |
| 493 | + $links[] = $linker->link( |
496 | 494 | $this->getTitle(), |
497 | 495 | htmlspecialchars( $group->getLabel() ), |
498 | 496 | array(), |
— | — | @@ -501,7 +499,7 @@ |
502 | 500 | // Do not show language part for English. |
503 | 501 | if ( $code !== 'en' ) { |
504 | 502 | $langname = TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() ); |
505 | | - $links[] = $this->skin->link( |
| 503 | + $links[] = $linker->link( |
506 | 504 | $this->getTitle(), |
507 | 505 | htmlspecialchars( $langname ), |
508 | 506 | array(), |