fix version number return for "modify" sections of diff uploads
authorFrederik Ramm <frederik@remote.org>
Sat, 8 Nov 2008 19:43:31 +0000 (19:43 +0000)
committerFrederik Ramm <frederik@remote.org>
Sat, 8 Nov 2008 19:43:31 +0000 (19:43 +0000)
config/database.yml
config/environment.rb
config/environments/development.rb
lib/diff_reader.rb

index cc3f9a1a5fb26e4fd5b2186728c3e4d5c6b45127..09c9dbe6b79a1e413c814963fca7517900cdc6c3 100644 (file)
@@ -12,9 +12,9 @@
 #   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
 development:
   adapter: mysql
-  database: openstreetmap
-  username: openstreetmap
-  password: openstreetmap
+  database: osm
+  username: osm
+  password: osm
   host: localhost
   encoding: utf8
 
index 171bb6fc8e5d4b688cad375ac39574e953669259..2c9e4803c94af6de128ee1d62daf0cd1411cd09a 100644 (file)
@@ -60,7 +60,7 @@ Rails::Initializer.run do |config|
 
   # Force all environments to use the same logger level
   # (by default production uses :info, the others :debug)
-  config.log_level = :debug
+  config.log_level = :debug
 
   # Your secret key for verifying cookie session data integrity.
   # If you change this key, all old sessions will become invalid!
index 85c9a6080ea865b51fee9a43e23a6969d709ffb4..d67452f0c8680c25376243a069ff3527582d7a31 100644 (file)
@@ -14,4 +14,4 @@ config.action_view.debug_rjs                         = true
 config.action_controller.perform_caching             = false
 
 # Don't care if the mailer can't send
-config.action_mailer.raise_delivery_errors = false
\ No newline at end of file
+config.action_mailer.raise_delivery_errors = false
index d793f63e7bfda199d1ecc73b8d7dd6e32c8aa69d..f7c51d79704fbd036a7ff45ec26fbf41922c35d6 100644 (file)
@@ -129,8 +129,10 @@ class DiffReader
 
           xml_result = XML::Node.new model.to_s.downcase
           xml_result["old_id"] = old.id.to_s
-          xml_result["new_id"] = new.id.to_s
-          xml_result["new_version"] = new.version.to_s
+          xml_result["new_id"] = new.id.to_s 
+          # version is updated in "old" through the update, so we must not
+          # return new.version here but old.version!
+          xml_result["new_version"] = old.version.to_s
           result.root << xml_result
         end