]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Use some rails magic to avoid having to duplicate all the changeset
[rails.git] / app / controllers / changeset_controller.rb
index ca42751d37ac670c4504d5a492e9012af6826f00..8d029aae50d10078483c9ba9961ff7cb1566f5d5 100644 (file)
@@ -255,23 +255,20 @@ class ChangesetController < ApplicationController
   # list edits (open changesets) in reverse chronological order
   def list
     conditions = conditions_nonempty
-    
-    
-   # @changesets = Changeset.find(:all, :order => "closed_at DESC", :conditions => ['closed_at < ?', DateTime.now], :limit=> 20)
-   
-   
-   #@edit_pages, @edits = paginate(:changesets,
-   #                                :include => [:user, :changeset_tags],
-   #                                :conditions => conditions,
-   #                                :order => "changesets.created_at DESC",
-   #                                :per_page => 20)
-   #
-    
-   @edits =  Changeset.find(:all,
-                                   :order => "changesets.created_at DESC",
-                                   :conditions => conditions,
-                                   :limit => 20)
-    
+
+    # @changesets = Changeset.find(:all, :order => "closed_at DESC", :conditions => ['closed_at < ?', DateTime.now], :limit=> 20)
+
+    #@edit_pages, @edits = paginate(:changesets,
+    #                                :include => [:user, :changeset_tags],
+    #                                :conditions => conditions,
+    #                                :order => "changesets.created_at DESC",
+    #                                :per_page => 20)
+    #
+
+    @edits =  Changeset.find(:all,
+                             :order => "changesets.created_at DESC",
+                             :conditions => conditions,
+                             :limit => 20)
   end
   
   ##
@@ -307,6 +304,8 @@ class ChangesetController < ApplicationController
        bbox = params['bbox']
     elsif params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat']
        bbox = h(params['minlon']) + ',' + h(params['minlat']) + ',' + h(params['maxlon']) + ',' + h(params['maxlat'])
+    elsif params['format'] == "rxml"
+      raise OSM::APIBadUserInput.new("Bounding box must be supplied for the RSS feed")
     else
       #TODO: fix bugs in location determination for history tab (and other tabs) then uncomment this redirect
       #redirect_to :action => 'list'