X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/369202787bc354fdb69b90cae8ce61322b75195c..a5ab0061220ce76450f67dbe311b23cedd67c95c:/app/controllers/amf_controller.rb diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 0b5e3a3ce..c7fa5dd80 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -76,7 +76,7 @@ class AmfController < ApplicationController logger.info("Executing AMF #{message}(#{args.join(',')}):#{index}") case message - when 'getpresets'; results[index]=AMF.putdata(index,getpresets(args[0])) + when 'getpresets'; results[index]=AMF.putdata(index,getpresets(I18n.locale)) when 'whichways'; results[index]=AMF.putdata(index,whichways(*args)) when 'whichways_deleted'; results[index]=AMF.putdata(index,whichways_deleted(*args)) when 'getway'; results[index]=AMF.putdata(index,getway(args[0].to_i)) @@ -214,11 +214,11 @@ class AmfController < ApplicationController # uses POTLATCH_PRESETS global, set up in OSM::Potlatch. def getpresets(lang) #:doc: - lang.gsub!(/[^\w\-]/,'') - begin + logger.info("Loading Potlatch/#{lang} localisation") localised = YAML::load(File.open("#{RAILS_ROOT}/config/potlatch/localised/#{lang}/localised.yaml")) rescue + logger.info("Loading Potlatch/#{lang} localisation failed, using English defaults") localised = "" # guess we'll just have to use the hardcoded English text instead end @@ -598,14 +598,6 @@ class AmfController < ApplicationController # 6. hash of node versions (node=>version) def putway(renumberednodes, usertoken, changeset_id, wayversion, originalway, pointlist, attributes, nodes, deletednodes) #:doc: - -logger.info("renumberednodes is #{renumberednodes.inspect}") -logger.info("wayversion is #{wayversion}") -logger.info("pointlist is #{pointlist.inspect}") -logger.info("sendnodes is #{nodes.inspect}") -logger.info("deletednodes is #{deletednodes.inspect}") - - amf_handle_error("'putway' #{originalway}") do # -- Initialise