From bf76988ebc3efdf5753ee8ae275a2d24b4ab604e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 29 Jan 2009 12:26:32 +0000 Subject: [PATCH] Fixed an error when downloading gantt png at global level. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2332 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index cc9f70e4b..fc0279417 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -350,7 +350,7 @@ class IssuesController < ApplicationController respond_to do |format| format.html { render :template => "issues/gantt.rhtml", :layout => !request.xhr? } - format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{@project.identifier}-gantt.png") } if @gantt.respond_to?('to_image') + format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.png") } if @gantt.respond_to?('to_image') format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.pdf") } end end