X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2201a7ff32c7269ea32db455a2f038b02ea3cd4f..2bf56c7be32bd05d97aa08298c649478cf82d4af:/app/controllers/trace_controller.rb?ds=sidebyside diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 47a31d314..47bc62be8 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -60,6 +60,8 @@ class TraceController < ApplicationController if files.length > 0 conditions[0] += " AND gpx_files.id IN (#{files.join(',')})" + else + conditions[0] += " AND 0 = 1" end end @@ -90,6 +92,13 @@ class TraceController < ApplicationController end def mine + # Load the preference of whether the user set the trace public the last time + @trace = Trace.new + if @user.preferences.find(:first, :conditions => {:k => "gps.trace.public", :v => "default"}).nil? + @trace.public = false + else + @trace.public = true + end list(@user, "mine") end