]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/amf_controller.rb
Add current state to all nav elements
[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?
     user = getuser(usertoken)
 
     if user && !user.languages.empty?
-      request.user_preferred_languages = user.languages
+      http_accept_language.user_preferred_languages = user.languages
     end
 
     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
     (real_lang, localised) = getlocalized(lang)
 
     # Tell Potlatch what language it's using