Fixes Bug #28838 — remove CSS references to div.editsection which grep
[lhc/web/wiklou.git] / includes / OutputPage.php
index 3e22f84..82d082a 100644 (file)
@@ -125,6 +125,10 @@ class OutputPage {
        var $mTemplateIds = array();
        var $mImageTimeKeys = array();
 
+    var $mRedirectCode = '';
+
+    var $mFeedLinksAppendQuery = null;
+
        # What level of 'untrustworthiness' is allowed in CSS/JS modules loaded on this page?
        # @see ResourceLoaderModule::$origin
        # ResourceLoaderModule::ORIGIN_ALL is assumed unless overridden;
@@ -1307,10 +1311,11 @@ class OutputPage {
         * @return Mixed: previous value
         */
        public function setFileVersion( $file ) {
+               $val = null;
                if ( $file instanceof File && $file->exists() ) {
                        $val = array( 'time' => $file->getTimestamp(), 'sha1' => $file->getSha1() );
                }
-               return wfSetVar( $this->mFileVersion, $val );
+               return wfSetVar( $this->mFileVersion, $val, true );
        }
 
        /**
@@ -2257,15 +2262,14 @@ $templates
         * @return String: The doctype, opening <html>, and head element.
         */
        public function headElement( Skin $sk, $includeStyle = true ) {
-               global $wgUseTrackbacks;
+               global $wgUseTrackbacks, $wgLang;
 
                if ( $sk->commonPrintStylesheet() ) {
                        $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' );
                }
                $sk->setupUserCss( $this );
 
-               $lang = wfUILang();
-               $ret = Html::htmlHeader( array( 'lang' => $lang->getCode(), 'dir' => $lang->getDir() ) );
+               $ret = Html::htmlHeader( array( 'lang' => $wgLang->getCode(), 'dir' => $wgLang->getDir() ) );
 
                if ( $this->getHTMLTitle() == '' ) {
                        $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) );
@@ -2311,9 +2315,11 @@ $templates
                                Xml::escapeJsString( $editUrl ) . "'";
                }
 
-               # Class bloat
-               $dir = wfUILang()->getDir();
-               $bodyAttrs['class'] = "mediawiki $dir";
+               # Classes for LTR/RTL directionality support
+               global $wgLang, $wgContLang;
+               $userdir = $wgLang->getDir();
+               $sitedir = $wgContLang->getDir();
+               $bodyAttrs['class'] = "mediawiki $userdir sitedir-$sitedir";
 
                if ( $this->getContext()->getLang()->capitalizeAllNouns() ) {
                        # A <body> class is probably not the best way to do this . . .
@@ -2359,7 +2365,7 @@ $templates
                        }
 
                        if ( $wgEnableMWSuggest && !$this->getUser()->getOption( 'disablesuggest', false ) ) {
-                               $this->addModules( 'mediawiki.legacy.mwsuggest' );
+                               $this->addModules( 'mediawiki.page.mwsuggest' );
                        }
                }
 
@@ -3020,8 +3026,8 @@ $templates
         */
        protected function styleLink( $style, $options ) {
                if( isset( $options['dir'] ) ) {
-                       $siteDir = wfUILang()->getDir();
-                       if( $siteDir != $options['dir'] ) {
+                       global $wgLang;
+                       if( $wgLang->getDir() != $options['dir'] ) {
                                return '';
                        }
                }