]> git.openstreetmap.org Git - rails.git/commitdiff
Treat an explicit public=0 argument as meaning private.
authorTom Hughes <tom@compton.nu>
Sat, 12 Sep 2009 16:46:25 +0000 (16:46 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 12 Sep 2009 16:46:25 +0000 (16:46 +0000)
app/controllers/trace_controller.rb

index 51e7f9b834c53e8544dbf6030d33f964a0e8ddce..b29b6dde1b0e06fd8fbeca14b2483d167715da03 100644 (file)
@@ -296,7 +296,7 @@ class TraceController < ApplicationController
       visibility = params[:visibility]
 
       if visibility.nil?
       visibility = params[:visibility]
 
       if visibility.nil?
-        if params[:public]
+        if params[:public] && params[:public].to_i.nonzero?
           visibility = "public"
         else
           visibility = "private"
           visibility = "public"
         else
           visibility = "private"