* Add wikitext with a custom Title object
*
* @param string $text Wikitext
- * @param Title $title
+ * @param Title &$title
* @param bool $linestart Is this the start of a line?
*/
public function addWikiTextWithTitle( $text, &$title, $linestart = true ) {
* Add wikitext with a custom Title object and tidy enabled.
*
* @param string $text Wikitext
- * @param Title $title
+ * @param Title &$title
* @param bool $linestart Is this the start of a line?
*/
function addWikiTextTitleTidy( $text, &$title, $linestart = true ) {
/**
* Add the output of a QuickTemplate to the output buffer
*
- * @param QuickTemplate $template
+ * @param QuickTemplate &$template
*/
public function addTemplate( &$template ) {
$this->addHTML( $template->getHTML() );
$pieces[] = $this->buildExemptModules();
$pieces = array_merge( $pieces, array_values( $this->getHeadLinksArray() ) );
$pieces = array_merge( $pieces, array_values( $this->mHeadItems ) );
+
+ $min = ResourceLoader::inDebugMode() ? '' : '.min';
+ // Use an IE conditional comment to serve the script only to old IE
+ $pieces[] = '<!--[if lt IE 9]>' .
+ Html::element( 'script', [
+ 'src' => self::transformResourcePath(
+ $this->getConfig(),
+ "/resources/lib/html5shiv/html5shiv{$min}.js"
+ ),
+ ] ) .
+ '<![endif]-->';
+
$pieces[] = Html::closeElement( 'head' );
$bodyClasses = [];