]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Localisation updates from http://translatewiki.net.
[rails.git] / app / controllers / trace_controller.rb
index 7b2314be33c9db4b91906ececf8d5745768f128b..4b138bdaecf5d52f22c08faec64671516bda6d92 100644 (file)
@@ -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
@@ -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