Merge branch 'master' into history
[potlatch2.git] / net / systemeD / halcyon / connection / XMLBaseConnection.as
index c94a8572b2533e01f1544551babdd4fa52b190f7..9d05aa0aa5c95749241dd389fd773e8e8f86795a 100644 (file)
@@ -29,6 +29,7 @@ package net.systemeD.halcyon.connection {
                                var version:uint;
                                var uid:Number;
                                var timestamp:String;
+                               var user:String;
                                var tags:Object;
                                var node:Node, newNode:Node;
                                var unusedNodes:Object={};
@@ -49,6 +50,7 @@ package net.systemeD.halcyon.connection {
                                        version = uint(relData.@version);
                                        uid = Number(relData.@uid);
                                        timestamp = relData.@timestamp;
+                                       user = relData.@user;
                           
                                        var rel:Relation = getRelation(id);
                                        if ( rel == null || !rel.loaded || singleEntityRequest ) {
@@ -86,11 +88,11 @@ package net.systemeD.halcyon.connection {
                                                }
                                        
                                                if ( rel == null ) {
-                                                       rel=new Relation(this, id, version, tags, true, members, uid, timestamp);
+                                                       rel=new Relation(this, id, version, tags, true, members, uid, timestamp, user);
                                                        setRelation(rel, false);
                                                        createdEntities.push(rel);
                                                } else {
-                                                       rel.update(version, tags, true, false, members, uid, timestamp);
+                                                       rel.update(version, tags, true, false, members, uid, timestamp, user);
                                                        sendEvent(new EntityEvent(NEW_RELATION, rel), false);
                                                }
                                        }
@@ -107,7 +109,8 @@ package net.systemeD.halcyon.connection {
                                                                           Number(nodeData.@lat),
                                                                           Number(nodeData.@lon),
                                                                           Number(nodeData.@uid),
-                                                                          nodeData.@timestamp);
+                                                                          nodeData.@timestamp,
+                                                                          nodeData.@user);
                                
                                        if ( singleEntityRequest ) {
                                                // it's a revert request, so create/update the node
@@ -129,6 +132,7 @@ package net.systemeD.halcyon.connection {
                                        version = uint(data.@version);
                                        uid = Number(data.@uid);
                                        timestamp = data.@timestamp;
+                                       user = data.@user;
 
                                        var way:Way = getWay(id);
                                        if ( way == null || !way.loaded || singleEntityRequest) {
@@ -142,12 +146,12 @@ package net.systemeD.halcyon.connection {
                                                }
                                                tags = parseTags(data.tag);
                                                if ( way == null ) {
-                                                       way=new Way(this, id, version, tags, true, nodelist, uid, timestamp)
+                                                       way=new Way(this, id, version, tags, true, nodelist, uid, timestamp, user)
                                                        setWay(way,false);
                                                        createdEntities.push(way);
                                                } else {
                                                        waycount++;
-                                                       way.update(version, tags, true, true, nodelist, uid, timestamp);
+                                                       way.update(version, tags, true, true, nodelist, uid, timestamp, user);
                                                        sendEvent(new EntityEvent(NEW_WAY, way), false);
                                                }
                                        }