Index: trunk/phase3/includes/Export.php |
— | — | @@ -618,7 +618,13 @@ |
619 | 619 | $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; |
620 | 620 | $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; |
621 | 621 | } else { |
622 | | - $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; |
| 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 | + } |
623 | 629 | } |
624 | 630 | $out .= " </contributor>\n"; |
625 | 631 | return $out; |