# 4 - user's traces, not logged in as that user = all user's public traces
if target_user.nil? # all traces
if @user
# 4 - user's traces, not logged in as that user = all user's public traces
if target_user.nil? # all traces
if @user
end
else
if @user and @user == target_user
conditions = ["gpx_files.user_id = ?", @user.id] #3 (check vs user id, so no join + can't pick up non-public traces by changing name)
else
end
else
if @user and @user == target_user
conditions = ["gpx_files.user_id = ?", @user.id] #3 (check vs user id, so no join + can't pick up non-public traces by changing name)
else
if params[:file].respond_to?(:read)
do_create(params[:file], tags, description, visibility)
if params[:file].respond_to?(:read)
do_create(params[:file], tags, description, visibility)