]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Rework expansion of HTTP status code to work with rails 3
[rails.git] / app / controllers / changeset_controller.rb
index 5a4dc36fb62a137d95a2dc1db2a858e61c22c990..b580ea7866ec5bbd5810c60c9cf46b8d21e5f161 100644 (file)
@@ -16,8 +16,6 @@ class ChangesetController < ApplicationController
   around_filter :api_call_handle_error, :except => [:list]
   around_filter :web_timeout, :only => [:list]
 
-  filter_parameter_logging "<osmChange version"
-
   # Help methods for checking boundary sanity and area size
   include MapBoundary
 
@@ -179,9 +177,7 @@ class ChangesetController < ApplicationController
           created << elt.to_xml_node
         else
           # get the previous version from the element history
-          prev_elt = elt.class.find(:first, :conditions => 
-                                    ['id = ? and version = ?',
-                                     elt.id, elt.version])
+          prev_elt = elt.class.where(:id => elt.id, :version => elt.version).first
           unless elt.visible
             # if the element isn't visible then it must have been deleted, so
             # output the *previous* XML
@@ -312,6 +308,8 @@ class ChangesetController < ApplicationController
       @page = (params[:page] || 1).to_i
       @page_size = 20
 
+      @bbox = bbox
+      
       @edits = Changeset.find(:all,
                               :include => [:user, :changeset_tags],
                               :conditions => conditions,
@@ -444,7 +442,7 @@ private
   # eliminate empty changesets (where the bbox has not been set)
   # this should be applied to all changeset list displays
   def conditions_nonempty()
-    return ['min_lat IS NOT NULL']
+    return ['num_changes > 0']
   end
   
 end