Fix backwards compatibility code to handle an old style public

attribute correctly. Closes #2242.
This commit is contained in:
Tom Hughes 2009-08-31 23:28:51 +00:00
parent ade96da19f
commit 543e8c5503

View file

@ -293,12 +293,16 @@ class TraceController < ApplicationController
if request.post?
tags = params[:tags] || ""
description = params[:description] || ""
visibility = params[:visibility] || false
visibility = params[:visibility]
if params[:public] && !visibility
visibility = "public"
if visibility.nil?
if params[:public]
visibility = "public"
else
visibility = "private"
end
end
if params[:file].respond_to?(:read)
do_create(params[:file], tags, description, visibility)