X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/cd43529cc8d9b8c020117fd5d690a64f2f0464b9..346b097d8544baba090b45d28f42d74021d14356:/app/controllers/trace_controller.rb diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index dbb8a6f2c..d709b5cf1 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -163,7 +163,7 @@ class TraceController < ApplicationController trace = Trace.find(params[:id]) if trace.visible? and (trace.public? or (@user and @user == trace.user)) - if Acl.match(request.remote_ip).where(:k => "no_trace_download").exists? + if Acl.no_trace_download(request.remote_ip) render :nothing => true, :status => :forbidden elsif request.format == Mime::XML send_file(trace.xml_file, :filename => "#{trace.id}.xml", :type => Mime::XML.to_s, :disposition => 'attachment') @@ -224,7 +224,7 @@ class TraceController < ApplicationController end if params[:tag] - traces = traces.where("EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)") + traces = traces.where("EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)", params[:tag]) end traces = traces.order("timestamp DESC")