Index: trunk/phase3/includes/Export.php |
— | — | @@ -614,17 +614,11 @@ |
615 | 615 | |
616 | 616 | function writeContributor( $id, $text ) { |
617 | 617 | $out = " <contributor>\n"; |
618 | | - if ( $id ) { |
| 618 | + if ( $id || !IP::isValid( $text ) ) { |
619 | 619 | $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; |
620 | 620 | $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; |
621 | 621 | } else { |
622 | | - if ( IP::isValid( $text ) ) { |
623 | | - $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; |
624 | | - } |
625 | | - else { |
626 | | - $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; |
627 | | - $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; |
628 | | - } |
| 622 | + $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; |
629 | 623 | } |
630 | 624 | $out .= " </contributor>\n"; |
631 | 625 | return $out; |