Moved $wgQueryPages stuff out of the global scope and into a function
[lhc/web/wiklou.git] / includes / OutputPage.php
index 2b1d4a0..9cba0cc 100644 (file)
@@ -685,7 +685,7 @@ class OutputPage extends ContextSource {
                        return false;
                }
                if ( !$wgCachePages ) {
-                       wfDebug( __METHOD__ . ": CACHE DISABLED\n", 'log' );
+                       wfDebug( __METHOD__ . ": CACHE DISABLED\n" );
                        return false;
                }
 
@@ -1574,6 +1574,7 @@ class OutputPage extends ContextSource {
                $this->addModuleScripts( $parserOutput->getModuleScripts() );
                $this->addModuleStyles( $parserOutput->getModuleStyles() );
                $this->addModuleMessages( $parserOutput->getModuleMessages() );
+               $this->addJsConfigVars( $parserOutput->getJsConfigVars() );
 
                // Template versioning...
                foreach ( (array)$parserOutput->getTemplateIds() as $ns => $dbks ) {
@@ -2945,6 +2946,16 @@ $templates
                return $html;
        }
 
+       /**
+        * Get the javascript config vars to include on this page
+        *
+        * @return Array of javascript config vars
+        * @since 1.23
+        */
+       public function getJsConfigVars() {
+               return $this->mJsConfigVars;
+       }
+
        /**
         * Add one or more variables to be set in mw.config in JavaScript.
         *
@@ -3077,7 +3088,7 @@ $templates
                wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars, $this ) );
 
                // Merge in variables from addJsConfigVars last
-               return array_merge( $vars, $this->mJsConfigVars );
+               return array_merge( $vars, $this->getJsConfigVars() );
        }
 
        /**