type, in MonoBook output.
$ret .= "<html $xmlbits lang=\"$wgLanguageCode\" $rtl>\n";
$ret .= "<head>\n<title>{$this->mHTMLtitle}</title>\n";
array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );
+ $ret .= $this->getHeadLinks();
+ global $wgStyleSheetPath;
+ if( $this->isPrintable() ) {
+ $media = "";
+ } else {
+ $media = "media='print'";
+ }
+ $printsheet = htmlspecialchars( "$wgStyleSheetPath/wikiprintable.css" );
+ $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n";
+
+ $sk = $wgUser->getSkin();
+ $ret .= $sk->getHeadScripts();
+ $ret .= $sk->getUserStyles();
+
+ $ret .= "</head>\n";
+ return $ret;
+ }
+
+ function getHeadLinks() {
+ global $wgRequest;
+ $ret = "";
foreach ( $this->mMetatags as $tag ) {
if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) {
$a = "http-equiv";
$link = $wgRequest->escapeAppendQuery( "feed=rss" );
$ret .= "<link rel='alternate' type='application/rss+xml' title='RSS' href='$link' />\n";
}
- global $wgStyleSheetPath;
- if( $this->isPrintable() ) {
- $media = "";
- } else {
- $media = "media='print'";
- }
- $printsheet = htmlspecialchars( "$wgStyleSheetPath/wikiprintable.css" );
- $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n";
-
- $sk = $wgUser->getSkin();
- $ret .= $sk->getHeadScripts();
- $ret .= $sk->getUserStyles();
-
- $ret .= "</head>\n";
return $ret;
}
}
function outputPage( &$out ) {
global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
global $wgScriptPath, $wgStyleSheetPath, $wgLanguageCode, $wgUseNewInterlanguage;
- global $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
+ global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
$this->thispage = $wgTitle->getPrefixedDbKey();
$this->loggedin = $wgUser->getID() != 0;
$tpl->setRef( "title", &$this->titletxt ); // ?
$tpl->setRef( "thispage", &$this->thispage );
$tpl->set( "subtitle", $out->getSubtitle() );
- $tpl->setRef( 'charset', $wgOutputEncoding);
+ $tpl->setRef( 'mimetype', $wgMimeType );
+ $tpl->setRef( 'charset', $wgOutputEncoding );
+ $tpl->set( 'headlinks', $out->getHeadLinks() );
$tpl->setRef( 'skinname', $this->skinname );
$tpl->setRef( "loggedin", &$this->loggedin );
/* XXX currently unused, might get useful later
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}" lang="${lang}">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=${charset}" />
-
+ <meta http-equiv="Content-Type" content="${mimetype}; charset=${charset}" />
+ ${headlinks}
<title tal:content="title">Exciting xhtml slimfast</title>
<style type="text/css" media="screen">