]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application.rb
Tidy up AMF controller and optimise a few rails things.
[rails.git] / app / controllers / application.rb
index 7570fd82a072d2af2d2e70dd0e33cd2d83df391d..918e4b617822610bcd33c23ae5c48660af7e8b08 100644 (file)
@@ -43,8 +43,8 @@ class ApplicationController < ActionController::Base
     end 
   end 
 
     end 
   end 
 
-  def check_database_availability
-    if OSM_STATUS == :database_offline
+  def check_database_availability(need_api = false)
+    if OSM_STATUS == :database_offline or (need_api and OSM_STATUS == :api_offline)
       redirect_to :controller => 'site', :action => 'offline'
     end
   end
       redirect_to :controller => 'site', :action => 'offline'
     end
   end