return false;
}
if ( !$wgCachePages ) {
- wfDebug( __METHOD__ . ": CACHE DISABLED\n", 'log' );
+ wfDebug( __METHOD__ . ": CACHE DISABLED\n" );
return false;
}
$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 ) {
// Our XML declaration is output by Html::htmlHeader.
// http://www.whatwg.org/html/semantics.html#attr-meta-http-equiv-content-type
// http://www.whatwg.org/html/semantics.html#charset
- $ret .= Html::element( 'meta', array( 'charset' => 'UTF-8' ) );
+ $ret .= Html::element( 'meta', array( 'charset' => 'UTF-8' ) ) . "\n";
}
$ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n";
// Avoid Internet Explorer "compatibility view", so that
// jQuery can work correctly.
- $ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible', 'content' => 'IE=EDGE' ) );
+ $ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible', 'content' => 'IE=EDGE' ) ) . "\n";
$ret .= implode( "\n", array(
$this->getHeadLinks(),
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.
*
wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars, $this ) );
// Merge in variables from addJsConfigVars last
- return array_merge( $vars, $this->mJsConfigVars );
+ return array_merge( $vars, $this->getJsConfigVars() );
}
/**