From: Tom Hughes Date: Sun, 27 Jun 2010 13:42:47 +0000 (+0100) Subject: Make changeset browser show an error when the database is offline X-Git-Tag: live~6884^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0e40a4f1c449cd3f2e5080542590f009a9a09900 Make changeset browser show an error when the database is offline --- diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 1b77d48ee..f80a938ba 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -4,16 +4,17 @@ class ChangesetController < ApplicationController layout 'site' require 'xml/libxml' - before_filter :authorize_web, :only => [:list, :list_user, :list_bbox] - before_filter :set_locale, :only => [:list, :list_user, :list_bbox] + before_filter :authorize_web, :only => [:list] + before_filter :set_locale, :only => [:list] before_filter :authorize, :only => [:create, :update, :delete, :upload, :include, :close] before_filter :require_allow_write_api, :only => [:create, :update, :delete, :upload, :include, :close] before_filter :require_public_data, :only => [:create, :update, :delete, :upload, :include, :close] before_filter :check_api_writable, :only => [:create, :update, :delete, :upload, :include] - before_filter :check_api_readable, :except => [:create, :update, :delete, :upload, :download, :query] + before_filter :check_api_readable, :except => [:create, :update, :delete, :upload, :download, :query, :list] + before_filter(:only => [:list]) { |c| c.check_database_readable(true) } after_filter :compress_output - around_filter :api_call_handle_error, :except => [:list, :list_user, :list_bbox] - around_filter :web_timeout, :only => [:list, :list_user, :list_bbox] + around_filter :api_call_handle_error, :except => [:list] + around_filter :web_timeout, :only => [:list] filter_parameter_logging "