Merge "Fix trailing whitespace (and mixed spaces) in XSD files"
[lhc/web/wiklou.git] / includes / OutputPage.php
index bdf2223..560588f 100644 (file)
@@ -1,7 +1,24 @@
 <?php
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 1 );
-}
+/**
+ * Preparation for the final page rendering.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
 
 /**
  * This class should be covered by a general architecture document which does
@@ -1661,18 +1678,6 @@ class OutputPage extends ContextSource {
                return $cookies;
        }
 
-       /**
-        * Return whether this page is not cacheable because "useskin" or "uselang"
-        * URL parameters were passed.
-        *
-        * @return Boolean
-        */
-       function uncacheableBecauseRequestVars() {
-               $request = $this->getRequest();
-               return $request->getText( 'useskin', false ) === false
-                       && $request->getText( 'uselang', false ) === false;
-       }
-
        /**
         * Check if the request has a cache-varying cookie header
         * If it does, it's very important that we don't allow public caching
@@ -1840,7 +1845,7 @@ class OutputPage extends ContextSource {
                        $response->header( $this->getXVO() );
                }
 
-               if( !$this->uncacheableBecauseRequestVars() && $this->mEnableClientCache ) {
+               if( $this->mEnableClientCache ) {
                        if(
                                $wgUseSquid && session_id() == '' && !$this->isPrintable() &&
                                $this->mSquidMaxage != 0 && !$this->haveCacheVaryCookies()
@@ -2584,10 +2589,14 @@ $templates
                        // Inline empty modules: since they're empty, just mark them as 'ready'
                        if ( count( $emptyModules ) > 0 && $only !== ResourceLoaderModule::TYPE_STYLES ) {
                                // If we're only getting the styles, we don't need to do anything for empty modules.
-                               $links .= Html::inlineScript(\r
-                                               ResourceLoader::makeLoaderConditionalScript(\r
-                                                               ResourceLoader::makeLoaderStateScript( $emptyModules )\r
-                                               )\r
+                               $links .= Html::inlineScript(
+
+                                               ResourceLoader::makeLoaderConditionalScript(
+
+                                                               ResourceLoader::makeLoaderStateScript( $emptyModules )
+
+                                               )
+
                                ) . "\n";
                        }