Put this is getHeadLinks() instead to reduce code duplication. Also, update RELEASE...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 30 Jun 2008 01:34:07 +0000 (01:34 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 30 Jun 2008 01:34:07 +0000 (01:34 +0000)
RELEASE-NOTES
includes/OutputPage.php
skins/Modern.php
skins/MonoBook.php

index efe386e..3ec30a5 100644 (file)
@@ -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 ===
 
index 5f1d62a..4e7739a 100644 (file)
@@ -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 = "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?>\n";
@@ -1354,7 +1354,6 @@ class OutputPage {
                }
                $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" $rtl>\n";
                $ret .= "<head>\n<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n";
-               $ret .= "<meta name=\"generator\" content=\"MediaWiki " . $wgVersion . "\" />\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 = "<meta name=\"generator\" content=\"MediaWiki " . $wgVersion . "\" />\n";
                foreach ( $this->mMetatags as $tag ) {
                        if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) {
                                $a = 'http-equiv';
index eb5c0f2..ea75e1c 100644 (file)
@@ -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 {
                <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
                <?php $this->html('headlinks') ?>
                <title><?php $this->text('pagetitle') ?></title>
-               <meta name="generator" content="MediaWiki <?php echo $wgVersion ?>" />
                <?php if(empty($this->data['printable']) ) { ?>
                <style type="text/css" media="screen, projection">/*<![CDATA[*/
                        @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
index 3efd88d..5fb397f 100644 (file)
@@ -45,7 +45,7 @@ class MonoBookTemplate 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
@@ -60,7 +60,6 @@ class MonoBookTemplate extends QuickTemplate {
                <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
                <?php $this->html('headlinks') ?>
                <title><?php $this->text('pagetitle') ?></title>
-               <meta name="generator" content="MediaWiki <?php echo $wgVersion ?>" />
                <style type="text/css" media="screen, projection">/*<![CDATA[*/
                        @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
                        @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";