r106081 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106080‎ | r106081 | r106082 >
Date:20:28, 13 December 2011
Author:jeroendedauw
Status:resolved
Tags:
Comment:
use linker::link instead of link on skin obtained via user
Modified paths:
  • /trunk/extensions/Translate/utils/MessageTable.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageTable.php
@@ -94,9 +94,6 @@
9595 }
9696
9797 public function contents() {
98 - global $wgUser;
99 - $sk = $wgUser->getSkin();
100 -
10198 $optional = wfMsgHtml( 'translate-optional' );
10299
103100 $this->doLinkBatch();
@@ -126,7 +123,7 @@
127124 global $wgLang;
128125 $niceTitle = htmlspecialchars( $wgLang->truncate( $key, - 30 ) );
129126
130 - $tools['edit'] = $sk->link(
 127+ $tools['edit'] = Linker::link(
131128 $title,
132129 $niceTitle,
133130 TranslationEditPage::jsEdit( $title ),
Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -1172,8 +1172,6 @@
11731173 * @return link
11741174 */
11751175 public static function ajaxEditLink( $target, $text ) {
1176 - global $wgUser;
1177 -
11781176 list( $page, ) = TranslateEditAddons::figureMessage( $target );
11791177 $group = TranslateUtils::messageKeyToGroup( $target->getNamespace(), $page );
11801178
@@ -1183,7 +1181,7 @@
11841182
11851183 $jsEdit = TranslationEditPage::jsEdit( $target, $group );
11861184
1187 - return $wgUser->getSkin()->link( $target, $text, $jsEdit, $params );
 1185+ return Linker::link( $target, $text, $jsEdit, $params );
11881186 }
11891187
11901188 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r106087Follow up to r106081; compat with 1.17 and 1.16jeroendedauw20:43, 13 December 2011

Status & tagging log