r52071 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52070‎ | r52071 | r52072 >
Date:20:18, 17 June 2009
Author:werdna
Status:ok
Tags:
Comment:
Add classes to tag markers on recentchanges
Modified paths:
  • /trunk/phase3/includes/ChangeTags.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangeTags.php
@@ -13,11 +13,15 @@
1414 $tags = explode( ',', $tags );
1515 $displayTags = array();
1616 foreach( $tags as $tag ) {
17 - $displayTags[] = self::tagDescription( $tag );
 17+ $displayTags[] = Xml::tags( 'span',
 18+ array( 'class' => "mw-tag-marker mw-tag-marker-$tag" ),
 19+ self::tagDescription( $tag ) );
1820 $classes[] = Sanitizer::escapeClass( "mw-tag-$tag" );
1921 }
2022
21 - return array( '(' . implode( ', ', $displayTags ) . ')', $classes );
 23+ $markers = '(' . implode( ', ', $displayTags ) . ')';
 24+ $markers = Xml::tags( 'span', array( 'class' => 'mw-tag-markers' ), $markers );
 25+ return array( $markers, $classes );
2226 }
2327
2428 static function tagDescription( $tag ) {

Status & tagging log