]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Merge data browser branch to trunk.
[rails.git] / app / controllers / trace_controller.rb
index cf35d00462c0c7461be2928737345048033dffdb..0467e66bac49028fff5a56f21c4d84b55fe1e8ba 100644 (file)
@@ -1,7 +1,10 @@
 class TraceController < ApplicationController
+  layout 'site'
+
   before_filter :authorize_web  
   before_filter :authorize, :only => [:api_details, :api_data, :api_create]
-  layout 'site'
+  before_filter :check_database_availability, :except => [:api_details, :api_data, :api_create]
+  before_filter :check_read_availability, :only => [:api_details, :api_data, :api_create]
  
   # Counts and selects pages of GPX traces for various criteria (by user, tags, public etc.).
   #  target_user - if set, specifies the user to fetch traces for.  if not set will fetch all traces