Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2261,14 +2261,16 @@ |
2262 | 2262 | * @return String: The doctype, opening <html>, and head element. |
2263 | 2263 | */ |
2264 | 2264 | public function headElement( Skin $sk, $includeStyle = true ) { |
2265 | | - global $wgUseTrackbacks, $wgLang; |
| 2265 | + global $wgLang, $wgContLang, $wgUseTrackbacks; |
| 2266 | + $userdir = $wgLang->getDir(); |
| 2267 | + $sitedir = $wgContLang->getDir(); |
2266 | 2268 | |
2267 | 2269 | if ( $sk->commonPrintStylesheet() ) { |
2268 | 2270 | $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' ); |
2269 | 2271 | } |
2270 | 2272 | $sk->setupUserCss( $this ); |
2271 | 2273 | |
2272 | | - $ret = Html::htmlHeader( array( 'lang' => $wgLang->getCode(), 'dir' => $wgLang->getDir() ) ); |
| 2274 | + $ret = Html::htmlHeader( array( 'lang' => $wgLang->getCode(), 'dir' => $userdir ) ); |
2273 | 2275 | |
2274 | 2276 | if ( $this->getHTMLTitle() == '' ) { |
2275 | 2277 | $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) ); |
— | — | @@ -2315,9 +2317,6 @@ |
2316 | 2318 | } |
2317 | 2319 | |
2318 | 2320 | # Classes for LTR/RTL directionality support |
2319 | | - global $wgLang, $wgContLang; |
2320 | | - $userdir = $wgLang->getDir(); |
2321 | | - $sitedir = $wgContLang->getDir(); |
2322 | 2321 | $bodyAttrs['class'] = "mediawiki $userdir sitedir-$sitedir"; |
2323 | 2322 | |
2324 | 2323 | if ( $this->getContext()->getLang()->capitalizeAllNouns() ) { |