r54258 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54257‎ | r54258 | r54259 >
Date:09:14, 3 August 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Make work with core r54242
Modified paths:
  • /trunk/extensions/CleanChanges/CleanChanges_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CleanChanges/CleanChanges_body.php
@@ -537,25 +537,25 @@
538538 function getFlags( $rc, Array $overrides = null ) {
539539 // TODO: we assume all characters are of equal width, which they may be not
540540 $map = array(
541 - # item => field class letter
542 - 'new' => array( 'rc_new', 'newpage', $this->message['newpageletter'] ),
543 - 'minor' => array( 'rc_minor', 'minor', $this->message['minoreditletter'] ),
544 - 'bot' => array( 'rc_bot', 'bot', $this->message['boteditletter'] ),
 541+ # item => field letter-or-something
 542+ 'new' => array( 'rc_new', self::flag( 'newpage' ) ),
 543+ 'minor' => array( 'rc_minor', self::flag( 'minor' ) ),
 544+ 'bot' => array( 'rc_bot', self::flag( 'bot' ) ),
545545 );
546546 if ( self::usePatrol() ) {
547 - $map['patrol'] = array( 'rc_patrolled', 'unpatrolled', '!' );
 547+ $map['patrol'] = array( 'rc_patrolled', self::flag( 'unpatrolled' ) );
548548 }
549549
550 -
551550 static $nothing = "\xc2\xa0";
552551
553552 $items = array();
554553 foreach ( $map as $item => $data ) {
555 - $bool = isset($overrides[$item]) ? $overrides[$item] : $rc->getAttribute( $data[0] );
556 - $items[] = $this->XMLwrapper( $data[1], $bool ? $data[2] : $nothing );
 554+ list( $field, $flag ) = $data;
 555+ $bool = isset($overrides[$item]) ? $overrides[$item] : $rc->getAttribute( $field );
 556+ $items[] = $bool ? $flag : $nothing;
557557 }
558558
559 - return Xml::tags( 'span', null, implode( '', $items ) );
 559+ return implode( '', $items );
560560 }
561561
562562 protected function getCharacterDifference( $new, $old = null ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r54242Add legend and tooltips to explain RC flags...simetrical22:15, 2 August 2009

Status & tagging log