]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Merge remote-tracking branch 'upstream/master' into routing
[rails.git] / app / controllers / application_controller.rb
index fec202ca545fa8b8ee80155c40bbfed44ef6a032..90a9672760755a6ee060e8540cb6fc71ea041d5d 100644 (file)
@@ -73,7 +73,7 @@ class ApplicationController < ActionController::Base
     if request.cookies["_osm_session"].to_s == ""
       if params[:cookie_test].nil?
         session[:cookie_test] = true
-        redirect_to params.merge(:cookie_test => "true")
+        redirect_to Hash[params].merge(:cookie_test => "true")
         return false
       else
         flash.now[:warning] = t 'application.require_cookies.cookies_needed'
@@ -418,6 +418,10 @@ class ApplicationController < ActionController::Base
     request.body.rewind
   end
 
+  def map_layout
+    request.xhr? ? 'xhr' : 'map'
+  end
+
   def preferred_editor
     editor = if params[:editor]
       params[:editor]
@@ -427,7 +431,7 @@ class ApplicationController < ActionController::Base
       DEFAULT_EDITOR
     end
 
-    if request.env['HTTP_USER_AGENT'] =~ /MSIE/ and editor == 'id'
+    if request.env['HTTP_USER_AGENT'] =~ /MSIE|Trident/ and editor == 'id'
       editor = 'potlatch2'
     end