From: Richard Fairhurst Date: Sun, 16 Nov 2008 13:30:02 +0000 (+0000) Subject: changeset comments and a couple of other small fixes X-Git-Tag: live~7604^2~149 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6690a9a09bca0afc3aac41e0d51789e965d9b9e7?ds=inline changeset comments and a couple of other small fixes --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 1fa433c9e..6e1b364d4 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -135,6 +135,14 @@ class AmfController < ApplicationController # close previous changeset and add comment if closeid + cs = Changeset.find(closeid) + cs.open = false + if closecomment.empty? + cs.save! + else + cs.tags['comment']=closecomment + cs.save_with_tags! + end end # open a new changeset @@ -206,14 +214,13 @@ class AmfController < ApplicationController begin check_boundaries(xmin, ymin, xmax, ymax) rescue Exception => err - # FIXME: report an error rather than just return an empty result - return [[]] + return [-2,"Sorry - I can't get the map for that area."] end nodes_in_area = Node.find_by_area(ymin, xmin, ymax, xmax, :conditions => ["current_ways.visible = ?", false], :include => :ways_via_history) way_ids = nodes_in_area.collect { |node| node.ways_via_history_ids }.flatten.uniq - [way_ids] + [0,way_ids] end # Get a way including nodes and tags. diff --git a/public/potlatch/potlatch.swf b/public/potlatch/potlatch.swf index d26ff6e0d..cf17a3091 100755 Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ