From e57e74f071b7ef1469595955fbea13b17fa5cc9b Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Mon, 30 Jun 2008 01:34:07 +0000 Subject: [PATCH] Put this is getHeadLinks() instead to reduce code duplication. Also, update RELEASE-NOTES. --- RELEASE-NOTES | 1 + includes/OutputPage.php | 7 +++---- skins/Modern.php | 3 +-- skins/MonoBook.php | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index efe386e355..3ec30a5663 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -172,6 +172,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN are in Special:Recentchanges * Allow an $error message to be passed to ArticleDelete hook * Allow extensions to modify the user creation form by calling addInputItem(); +* Add meta generator tag to HTML output === Bug fixes in 1.13 === diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 5f1d62a6db..4e7739a3ab 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1333,7 +1333,7 @@ class OutputPage { public function headElement() { global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType; global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; - global $wgUser, $wgContLang, $wgUseTrackbacks, $wgTitle, $wgStyleVersion, $wgVersion; + global $wgUser, $wgContLang, $wgUseTrackbacks, $wgTitle, $wgStyleVersion; if( $wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml' ) { $ret = "\n"; @@ -1354,7 +1354,6 @@ class OutputPage { } $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" $rtl>\n"; $ret .= "\n" . htmlspecialchars( $this->getHTMLTitle() ) . "\n"; - $ret .= "\n"; array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) ); $ret .= $this->getHeadLinks(); @@ -1384,8 +1383,8 @@ class OutputPage { * @return string HTML tag links to be put in the header. */ public function getHeadLinks() { - global $wgRequest, $wgFeed; - $ret = ''; + global $wgRequest, $wgFeed, $wgVersion; + $ret = "\n"; foreach ( $this->mMetatags as $tag ) { if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) { $a = 'http-equiv'; diff --git a/skins/Modern.php b/skins/Modern.php index eb5c0f2bfb..ea75e1ca08 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -47,7 +47,7 @@ class ModernTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgUser, $wgVersion; + global $wgUser; $skin = $wgUser->getSkin(); // Suppress warnings to prevent notices about missing indexes in $this->data @@ -62,7 +62,6 @@ class ModernTemplate extends QuickTemplate { html('headlinks') ?> <?php $this->text('pagetitle') ?> - data['printable']) ) { ?>