From: Frederik Ramm Date: Sat, 8 Nov 2008 19:43:31 +0000 (+0000) Subject: fix version number return for "modify" sections of diff uploads X-Git-Tag: live~8121^2~187 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/79420631ceb2cb0f33e127b06e7b4f8a461b9281?ds=sidebyside fix version number return for "modify" sections of diff uploads --- diff --git a/config/database.yml b/config/database.yml index cc3f9a1a5..09c9dbe6b 100644 --- a/config/database.yml +++ b/config/database.yml @@ -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 diff --git a/config/environment.rb b/config/environment.rb index 171bb6fc8..2c9e4803c 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -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! diff --git a/config/environments/development.rb b/config/environments/development.rb index 85c9a6080..d67452f0c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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 diff --git a/lib/diff_reader.rb b/lib/diff_reader.rb index d793f63e7..f7c51d797 100644 --- a/lib/diff_reader.rb +++ b/lib/diff_reader.rb @@ -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