]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/amf_controller.rb
Restore previous map state on popstate
[rails.git] / app / controllers / amf_controller.rb
index ef7a636390de6df9ecea484bd6331ea91af66749..13372273c2eba0f940203bee76ff8964e2f3d279 100644 (file)
@@ -185,10 +185,10 @@ class AmfController < ApplicationController
     user = getuser(usertoken)
 
     if user && !user.languages.empty?
-      request.user_preferred_languages = user.languages
+      http_accept_language.user_preferred_languages = user.languages
     end
 
-    lang = request.compatible_language_from(getlocales)
+    lang = http_accept_language.compatible_language_from(getlocales)
     (real_lang, localised) = getlocalized(lang)
 
     # Tell Potlatch what language it's using