]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Use symbols consistently for names of content blocks
[rails.git] / app / controllers / changeset_controller.rb
index 29b9c787bc447706ef04a26fe4501b58ac947bee..8789476dbf4a4def010df3b46cc793ccf9f2a540 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
 
@@ -312,6 +310,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,
@@ -436,7 +436,7 @@ private
   # query changesets which are closed
   # ('closed at' time has passed or changes limit is hit)
   def conditions_closed(closed)
-    return closed.nil? ? nil : ['closed_at < ? or num_changes > ?', 
+    return closed.nil? ? nil : ['(closed_at < ? or num_changes > ?)', 
                                 Time.now.getutc, Changeset::MAX_ELEMENTS]
   end
 
@@ -444,7 +444,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