r46882 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46881‎ | r46882 | r46883 >
Date:23:36, 5 February 2009
Author:danny_b
Status:ok (Comments)
Tags:todo 
Comment:
* adding type="application/<feedtype>+xml" to links pointing to feeds
Modified paths:
  • /trunk/phase3/includes/Skin.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
@@ -296,7 +296,7 @@
297297 if($this->data['feeds']) { ?>
298298 <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
299299 ?><a id="<?php echo Sanitizer::escapeId( "feed-$key" ) ?>" href="<?php
300 - echo htmlspecialchars($feed['href']) ?>" rel="alternate" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;
 300+ echo htmlspecialchars($feed['href']) ?>" rel="alternate" type="application/<?php echo $key ?>+xml" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;
301301 <?php } ?></li><?php
302302 }
303303
Index: trunk/phase3/skins/Modern.php
@@ -294,7 +294,7 @@
295295 if($this->data['feeds']) { ?>
296296 <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
297297 ?><a id="<?php echo Sanitizer::escapeId( "feed-$key" ) ?>" href="<?php
298 - echo htmlspecialchars($feed['href']) ?>" rel="alternate" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;
 298+ echo htmlspecialchars($feed['href']) ?>" rel="alternate" type="application/<?php echo $key ?>+xml" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;
299299 <?php } ?></li><?php
300300 }
301301
Index: trunk/phase3/includes/Skin.php
@@ -1005,7 +1005,7 @@
10061006 if( $wgOut->isSyndicated() ) {
10071007 foreach( $wgFeedClasses as $format => $class ) {
10081008 $feedurl = $wgRequest->escapeAppendQuery( "feed=$format" );
1009 - $s .= " | <a href=\"$feedurl\" rel=\"alternate\" class=\"feedlink\">{$format}</a>";
 1009+ $s .= " | <a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\" class=\"feedlink\">{$format}</a>";
10101010 }
10111011 }
10121012 return $s;

Comments

#Comment by Brion VIBBER (talk | contribs)   01:14, 18 February 2009

All this code duplication is dreadful... probably be good to refactor a lot of this stuff some day.

Status & tagging log