]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Make the AMF API check that the CTs have been agreed
[rails.git] / app / controllers / changeset_controller.rb
index 29b9c787bc447706ef04a26fe4501b58ac947bee..0aeaf200d12393d8cba4e7cbca0e001f2d7e43ad 100644 (file)
@@ -312,6 +312,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 +438,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