Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1282,7 +1282,7 @@ |
1283 | 1283 | |
1284 | 1284 | /** |
1285 | 1285 | * Old function when $wgBetterDirectionality existed |
1286 | | - * Removed in core, kept in extensions for backwards compat. |
| 1286 | + * All usage removed, wfUILang can be removed in near future |
1287 | 1287 | * |
1288 | 1288 | * @deprecated since 1.18 |
1289 | 1289 | * @return Language |
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php |
— | — | @@ -286,7 +286,7 @@ |
287 | 287 | // This closes the div of mw-content-ltr/rtl containing lang and dir attributes |
288 | 288 | $this->output->addHTML( |
289 | 289 | Html::closeElement( 'div' ) . Html::openElement( 'div', |
290 | | - array( 'class' => 'lqt-talkpage', 'lang' => $wgLang->getCode(), 'dir' => wfUILang()->getDir() ) |
| 290 | + array( 'class' => 'lqt-talkpage', 'lang' => $wgLang->getCode(), 'dir' => $wgLang->getDir() ) |
291 | 291 | ) ); |
292 | 292 | } |
293 | 293 | |
— | — | @@ -560,11 +560,11 @@ |
561 | 561 | * Stolen from TablePager because it's pretty. |
562 | 562 | */ |
563 | 563 | function getNavigationBar() { |
564 | | - global $wgStylePath; |
565 | | - |
566 | 564 | if ( method_exists( $this, 'isNavigationBarShown' ) && |
567 | | - !$this->isNavigationBarShown() ) |
| 565 | + !$this->isNavigationBarShown() ) { |
568 | 566 | return ''; |
| 567 | + } |
| 568 | + global $wgStylePath, $wgLang; |
569 | 569 | |
570 | 570 | $path = "$wgStylePath/common/images"; |
571 | 571 | $labels = array( |
— | — | @@ -585,7 +585,7 @@ |
586 | 586 | 'next' => 'arrow_disabled_right_25.png', |
587 | 587 | 'last' => 'arrow_disabled_last_25.png', |
588 | 588 | ); |
589 | | - if( wfUILang()->isRTL() ) { |
| 589 | + if( $wgLang->isRTL() ) { |
590 | 590 | $keys = array_keys( $labels ); |
591 | 591 | $images = array_combine( $keys, array_reverse( $images ) ); |
592 | 592 | $disabledImages = array_combine( $keys, array_reverse( $disabledImages ) ); |
Index: trunk/extensions/OggHandler/OggHandler_body.php |
— | — | @@ -443,12 +443,11 @@ |
444 | 444 | } |
445 | 445 | |
446 | 446 | function setHeaders( $out ) { |
447 | | - global $wgOggScriptVersion, $wgCortadoJarFile; |
448 | | - |
449 | 447 | if ( $out->hasHeadItem( 'OggHandlerScript' ) && $out->hasHeadItem( 'OggHandlerInlineScript' ) && |
450 | 448 | $out->hasHeadItem( 'OggHandlerInlineCSS' ) ) { |
451 | 449 | return; |
452 | 450 | } |
| 451 | + global $wgOggScriptVersion, $wgCortadoJarFile, $wgLang; |
453 | 452 | |
454 | 453 | $msgNames = array( 'ogg-play', 'ogg-pause', 'ogg-stop', 'ogg-no-player', |
455 | 454 | 'ogg-player-videoElement', 'ogg-player-oggPlugin', 'ogg-player-cortado', 'ogg-player-vlc-mozilla', |
— | — | @@ -461,13 +460,12 @@ |
462 | 461 | $cortadoUrl = $wgCortadoJarFile; |
463 | 462 | $scriptPath = self::getMyScriptPath(); |
464 | 463 | if( substr( $cortadoUrl, 0, 1 ) != '/' |
465 | | - && substr( $cortadoUrl, 0, 4 ) != 'http' ) |
466 | | - { |
| 464 | + && substr( $cortadoUrl, 0, 4 ) != 'http' ) { |
467 | 465 | $cortadoUrl = wfExpandUrl( "$scriptPath/$cortadoUrl", PROTO_CURRENT ); |
468 | 466 | } |
469 | 467 | $encCortadoUrl = Xml::encodeJsVar( $cortadoUrl ); |
470 | 468 | $encExtPathUrl = Xml::encodeJsVar( $scriptPath ); |
471 | | - $alignStart = wfUILang()->alignStart(); |
| 469 | + $alignStart = $wgLang->alignStart(); |
472 | 470 | |
473 | 471 | $out->addHeadItem( 'OggHandlerScript' , Html::linkedScript( "{$scriptPath}/OggPlayer.js?$wgOggScriptVersion" ) ); |
474 | 472 | |
Index: trunk/extensions/FlaggedRevs/frontend/specialpages/reports/UnreviewedPages_body.php |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | |
111 | 111 | $stxt = $underReview = $watching = ''; |
112 | 112 | $link = Linker::link( $title, null, array(), 'redirect=no' ); |
113 | | - $dirmark = wfUILang()->getDirMark(); |
| 113 | + $dirmark = $this->getLang()->getDirMark(); |
114 | 114 | $hist = Linker::linkKnown( $title, wfMsgHtml( 'hist' ), array(), 'action=history' ); |
115 | 115 | if ( !is_null( $size = $row->page_len ) ) { |
116 | 116 | $stxt = ( $size == 0 ) |
Index: trunk/extensions/FlaggedRevs/frontend/specialpages/reports/ReviewedPages_body.php |
— | — | @@ -82,12 +82,9 @@ |
83 | 83 | |
84 | 84 | public function formatRow( $row ) { |
85 | 85 | $title = Title::newFromRow( $row ); |
86 | | - # Link to page |
87 | | - $link = Linker::link( $title ); |
88 | | - # Direction mark |
89 | | - $dirmark = wfUILang()->getDirMark(); |
90 | | - # Size (bytes) |
91 | | - $stxt = ''; |
| 86 | + $link = Linker::link( $title ); # Link to page |
| 87 | + $dirmark = $this->getLang()->getDirMark(); # Direction mark |
| 88 | + $stxt = ''; # Size (bytes) |
92 | 89 | if ( !is_null( $size = $row->page_len ) ) { |
93 | 90 | if ( $size == 0 ) { |
94 | 91 | $stxt = ' <small>' . wfMsgHtml( 'historyempty' ) . '</small>'; |
Index: trunk/extensions/GlobalUsage/SpecialGlobalUsage.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | $html .= Linker::makeThumbLinkObj( $this->target, |
65 | 65 | wfFindFile( $this->target ), |
66 | 66 | /* $label */ $this->target->getPrefixedText(), |
67 | | - /* $alt */ '', /* $align */ wfUILang()->alignEnd(), |
| 67 | + /* $alt */ '', /* $align */ $this->getLang()->alignEnd(), |
68 | 68 | /* $handlerParams */ array(), /* $framed */ false, |
69 | 69 | /* $manualThumb */ false ); |
70 | 70 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php |
— | — | @@ -231,7 +231,7 @@ |
232 | 232 | if ( $prev ) { |
233 | 233 | $prevTarget = SpecialPage::getTitleFor( 'Code', "$repo/$prev" ); |
234 | 234 | $links[] = '< ' . $this->skin->link( $prevTarget, $this->mRev->getIdString( $prev ), |
235 | | - array(), array( 'path' => $this->mPath ) ).wfUILang()->getDirMark(); |
| 235 | + array(), array( 'path' => $this->mPath ) ).$wgLang->getDirMark(); |
236 | 236 | } |
237 | 237 | |
238 | 238 | $revText = "<b>" . $this->mRev->getIdString( $rev ) . "</b>"; |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | if ( $viewvc ) { |
241 | 241 | $url = htmlspecialchars( "$viewvc/?view=rev&revision=$rev" ); |
242 | 242 | $viewvcTxt = wfMsgHtml( 'code-rev-rev-viewvc' ); |
243 | | - $revText .= " (<a href=\"$url\" title=\"revision $rev\">$viewvcTxt</a>)".wfUILang()->getDirMark(); |
| 243 | + $revText .= " (<a href=\"$url\" title=\"revision $rev\">$viewvcTxt</a>)".$wgLang->getDirMark(); |
244 | 244 | } |
245 | 245 | $links[] = $revText; |
246 | 246 | |
— | — | @@ -820,7 +820,8 @@ |
821 | 821 | * @return string |
822 | 822 | */ |
823 | 823 | protected function commentStyle( $comment ) { |
824 | | - $align = wfUILang()->AlignStart(); |
| 824 | + global $wgLang; |
| 825 | + $align = $wgLang->AlignStart(); |
825 | 826 | $depth = $comment->threadDepth(); |
826 | 827 | $margin = ( $depth - 1 ) * 48; |
827 | 828 | return "margin-$align: ${margin}px"; |