Index: trunk/extensions/CleanChanges/CleanChanges_body.php |
— | — | @@ -537,25 +537,25 @@ |
538 | 538 | function getFlags( $rc, Array $overrides = null ) { |
539 | 539 | // TODO: we assume all characters are of equal width, which they may be not |
540 | 540 | $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' ) ), |
545 | 545 | ); |
546 | 546 | if ( self::usePatrol() ) { |
547 | | - $map['patrol'] = array( 'rc_patrolled', 'unpatrolled', '!' ); |
| 547 | + $map['patrol'] = array( 'rc_patrolled', self::flag( 'unpatrolled' ) ); |
548 | 548 | } |
549 | 549 | |
550 | | - |
551 | 550 | static $nothing = "\xc2\xa0"; |
552 | 551 | |
553 | 552 | $items = array(); |
554 | 553 | 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; |
557 | 557 | } |
558 | 558 | |
559 | | - return Xml::tags( 'span', null, implode( '', $items ) ); |
| 559 | + return implode( '', $items ); |
560 | 560 | } |
561 | 561 | |
562 | 562 | protected function getCharacterDifference( $new, $old = null ) { |