--- ./app/controllers/issues_controller.rb.orig	2009-04-05 21:44:17.000000000 +0900
+++ ./app/controllers/issues_controller.rb	2009-04-24 01:57:40.000000000 +0900
@@ -343,10 +343,16 @@ class IssuesController < ApplicationCont
       @gantt.events = events
     end
     
+    if @project.nil?
+      basename = ''
+    else
+      basename = "#{@project.identifier}-"
+    end
+
     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.pdf  { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.pdf") }
+      format.png  { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}gantt.png") } if @gantt.respond_to?('to_image')
+      format.pdf  { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{basename}gantt.pdf") }
     end
   end
   
