api06: Return version ids in XML responses.
authorGabriel Ebner <gabriel@svn.openstreetmap.org>
Sun, 4 May 2008 10:01:23 +0000 (10:01 +0000)
committerGabriel Ebner <gabriel@svn.openstreetmap.org>
Sun, 4 May 2008 10:01:23 +0000 (10:01 +0000)
app/models/node.rb
app/models/old_node.rb
app/models/old_relation.rb
app/models/old_way.rb
app/models/relation.rb
app/models/way.rb

index 1752142..5e5e7a0 100644 (file)
@@ -152,6 +152,7 @@ class Node < GeoRecord
 
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
     return el1
   end
 
index 2f960d8..247a699 100644 (file)
@@ -47,6 +47,7 @@ class OldNode < GeoRecord
 
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
     return el1
   end
 
index 076c03e..03d5aeb 100644 (file)
@@ -92,6 +92,7 @@ class OldRelation < ActiveRecord::Base
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
     el1['user'] = self.user.display_name if self.user.data_public?
+    el1['version'] = self.version.to_s
     
     self.old_members.each do |member|
       e = XML::Node.new 'member'
index cdc0c47..136e647 100644 (file)
@@ -95,6 +95,7 @@ class OldWay < ActiveRecord::Base
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
     el1['user'] = self.user.display_name if self.user.data_public?
+    el1['version'] = self.version.to_s
     
     self.old_nodes.each do |nd| # FIXME need to make sure they come back in the right order
       e = XML::Node.new 'nd'
index 3a9c0d9..ec8c92c 100644 (file)
@@ -58,6 +58,7 @@ class Relation < ActiveRecord::Base
     el1['id'] = self.id.to_s
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
 
     user_display_name_cache = {} if user_display_name_cache.nil?
     
index 56c0717..104c550 100644 (file)
@@ -70,6 +70,7 @@ class Way < ActiveRecord::Base
     el1['id'] = self.id.to_s
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
 
     user_display_name_cache = {} if user_display_name_cache.nil?