X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/957d75295b2c379b17e61a2a22ee28fb5f701589..dca0be1886d9b9fcd2cab1b7c82ac4132fbf722b:/app/controllers/changeset_controller.rb?ds=sidebyside diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 8a72d941d..5b55980e3 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -15,6 +15,7 @@ class ChangesetController < ApplicationController before_action :check_api_readable, :except => [:create, :update, :delete, :upload, :download, :query, :list, :feed, :comment, :subscribe, :unsubscribe, :comments_feed] before_action(:only => [:list, :feed, :comments_feed]) { |c| c.check_database_readable(true) } around_action :api_call_handle_error, :except => [:list, :feed, :comments_feed] + around_action :api_call_timeout, :except => [:list, :feed, :comments_feed, :upload] around_action :web_timeout, :only => [:list, :feed, :comments_feed] # Helper methods for checking consistency @@ -293,7 +294,7 @@ class ChangesetController < ApplicationController changesets = changesets.where("changesets.id <= ?", params[:max_id]) end - @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags) + @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments) render :action => :list, :layout => false end @@ -455,7 +456,7 @@ class ChangesetController < ApplicationController # restrict changesets to those enclosed by a bounding box # we need to return both the changesets and the bounding box def conditions_bbox(changesets, bbox) - if bbox + if bbox bbox.check_boundaries bbox = bbox.to_scaled return changesets.where("min_lon < ? and max_lon > ? and min_lat < ? and max_lat > ?",