X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6391ea5a7ae59c13ca3b5317ba9a4b0fa27aa788..7599f98957334d1924550205f7ba12a726de7eb0:/app/controllers/trace_controller.rb diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index d0e70e933..4b138bdae 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -30,9 +30,7 @@ class TraceController < ApplicationController if !display_name.blank? target_user = User.active.where(:display_name => display_name).first if target_user.nil? - @title = t'trace.no_such_user.title' - @not_found_user = display_name - render :action => 'no_such_user', :status => :not_found + render_unknown_user display_name return end end @@ -187,7 +185,7 @@ class TraceController < ApplicationController @trace.tagstring = params[:trace][:tagstring] @trace.visibility = params[:trace][:visibility] if @trace.save - redirect_to :action => 'view' + redirect_to :action => 'view', :display_name => @user.display_name end end else @@ -370,7 +368,7 @@ private filename = "/tmp/#{rand}" # ...and save the uploaded file to that location - File.open(filename, "w") { |f| f.write(file.read) } + File.open(filename, "wb") { |f| f.write(file.read) } # Create the trace object, falsely marked as already # inserted to stop the import daemon trying to load it