r92574 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92573‎ | r92574 | r92575 >
Date:20:36, 19 July 2011
Author:platonides
Status:ok
Tags:
Comment:
Follow-up r91518
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -2261,14 +2261,16 @@
22622262 * @return String: The doctype, opening <html>, and head element.
22632263 */
22642264 public function headElement( Skin $sk, $includeStyle = true ) {
2265 - global $wgUseTrackbacks, $wgLang;
 2265+ global $wgLang, $wgContLang, $wgUseTrackbacks;
 2266+ $userdir = $wgLang->getDir();
 2267+ $sitedir = $wgContLang->getDir();
22662268
22672269 if ( $sk->commonPrintStylesheet() ) {
22682270 $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' );
22692271 }
22702272 $sk->setupUserCss( $this );
22712273
2272 - $ret = Html::htmlHeader( array( 'lang' => $wgLang->getCode(), 'dir' => $wgLang->getDir() ) );
 2274+ $ret = Html::htmlHeader( array( 'lang' => $wgLang->getCode(), 'dir' => $userdir ) );
22732275
22742276 if ( $this->getHTMLTitle() == '' ) {
22752277 $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) );
@@ -2315,9 +2317,6 @@
23162318 }
23172319
23182320 # Classes for LTR/RTL directionality support
2319 - global $wgLang, $wgContLang;
2320 - $userdir = $wgLang->getDir();
2321 - $sitedir = $wgContLang->getDir();
23222321 $bodyAttrs['class'] = "mediawiki $userdir sitedir-$sitedir";
23232322
23242323 if ( $this->getContext()->getLang()->capitalizeAllNouns() ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r92586Merge code cleanup revisions so that code analysis can also be performed in t...platonides21:29, 19 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91518(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionali...robin02:26, 6 July 2011

Status & tagging log