r36797 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36796‎ | r36797 | r36798 >
Date:01:34, 30 June 2008
Author:simetrical
Status:old
Tags:
Comment:
Put this is getHeadLinks() instead to reduce code duplication. Also, update RELEASE-NOTES.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/MonoBook.php
@@ -45,7 +45,7 @@
4646 * @access private
4747 */
4848 function execute() {
49 - global $wgUser, $wgVersion;
 49+ global $wgUser;
5050 $skin = $wgUser->getSkin();
5151
5252 // Suppress warnings to prevent notices about missing indexes in $this->data
@@ -60,7 +60,6 @@
6161 <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
6262 <?php $this->html('headlinks') ?>
6363 <title><?php $this->text('pagetitle') ?></title>
64 - <meta name="generator" content="MediaWiki <?php echo $wgVersion ?>" />
6564 <style type="text/css" media="screen, projection">/*<![CDATA[*/
6665 @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
6766 @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
Index: trunk/phase3/skins/Modern.php
@@ -47,7 +47,7 @@
4848 * @access private
4949 */
5050 function execute() {
51 - global $wgUser, $wgVersion;
 51+ global $wgUser;
5252 $skin = $wgUser->getSkin();
5353
5454 // Suppress warnings to prevent notices about missing indexes in $this->data
@@ -62,7 +62,6 @@
6363 <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
6464 <?php $this->html('headlinks') ?>
6565 <title><?php $this->text('pagetitle') ?></title>
66 - <meta name="generator" content="MediaWiki <?php echo $wgVersion ?>" />
6766 <?php if(empty($this->data['printable']) ) { ?>
6867 <style type="text/css" media="screen, projection">/*<![CDATA[*/
6968 @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
Index: trunk/phase3/includes/OutputPage.php
@@ -1333,7 +1333,7 @@
13341334 public function headElement() {
13351335 global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
13361336 global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces;
1337 - global $wgUser, $wgContLang, $wgUseTrackbacks, $wgTitle, $wgStyleVersion, $wgVersion;
 1337+ global $wgUser, $wgContLang, $wgUseTrackbacks, $wgTitle, $wgStyleVersion;
13381338
13391339 if( $wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml' ) {
13401340 $ret = "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?>\n";
@@ -1354,7 +1354,6 @@
13551355 }
13561356 $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" $rtl>\n";
13571357 $ret .= "<head>\n<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n";
1358 - $ret .= "<meta name=\"generator\" content=\"MediaWiki " . $wgVersion . "\" />\n";
13591358 array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );
13601359
13611360 $ret .= $this->getHeadLinks();
@@ -1384,8 +1383,8 @@
13851384 * @return string HTML tag links to be put in the header.
13861385 */
13871386 public function getHeadLinks() {
1388 - global $wgRequest, $wgFeed;
1389 - $ret = '';
 1387+ global $wgRequest, $wgFeed, $wgVersion;
 1388+ $ret = "<meta name=\"generator\" content=\"MediaWiki " . $wgVersion . "\" />\n";
13901389 foreach ( $this->mMetatags as $tag ) {
13911390 if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) {
13921391 $a = 'http-equiv';
Index: trunk/phase3/RELEASE-NOTES
@@ -172,6 +172,7 @@
173173 are in Special:Recentchanges
174174 * Allow an $error message to be passed to ArticleDelete hook
175175 * Allow extensions to modify the user creation form by calling addInputItem();
 176+* Add meta generator tag to HTML output
176177
177178 === Bug fixes in 1.13 ===
178179

Status & tagging log