From: Ariel Glenn Date: Thu, 17 Nov 2011 09:20:51 +0000 (+0000) Subject: if user id is 0 and username is actually an IP, write it as , not X-Git-Tag: 1.31.0-rc.0~26449 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=81cc6c7b4c9358338b82e70d3f7219e6ea0ef667;p=lhc%2Fweb%2Fwiklou.git if user id is 0 and username is actually an IP, write it as , not --- diff --git a/includes/Export.php b/includes/Export.php index 3d2a8c4956..4521434e8b 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -618,7 +618,13 @@ class XmlDumpWriter { $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; } else { - $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; + if ( IP::isValid( $text ) ) { + $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; + } + else { + $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; + $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; + } } $out .= " \n"; return $out;