X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d0b845fc6025f2fb84a4cf4fa10cbb71084843a7..4eb13dac19e7565ba1de6ab7614721360a8a8f6c:/app/controllers/changeset_controller.rb diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 704a2a0f6..8d029aae5 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -4,7 +4,6 @@ class ChangesetController < ApplicationController layout 'site' require 'xml/libxml' - session :off, :except => [:list, :list_user, :list_bbox] before_filter :authorize_web, :only => [:list, :list_user, :list_bbox] before_filter :set_locale, :only => [:list, :list_user, :list_bbox] before_filter :authorize, :only => [:create, :update, :delete, :upload, :include, :close] @@ -115,7 +114,7 @@ class ChangesetController < ApplicationController # changeset. # # Returns: a diffResult document, as described in - # http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.6 + # http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6 def upload # only allow POST requests, as the upload method is most definitely # not idempotent, as several uploads with placeholder IDs will have @@ -256,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 ## @@ -308,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'