[Bps-public-commit] r11461 - RT-Extension-Reports/html/Reports/Elements

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Apr 3 21:36:20 EDT 2008


Author: sunnavy
Date: Thu Apr  3 21:36:20 2008
New Revision: 11461

Modified:
   RT-Extension-Reports/html/Reports/Elements/ShowResults

Log:
$RT::MasonComponentRoot is much better than getcwd

Modified: RT-Extension-Reports/html/Reports/Elements/ShowResults
==============================================================================
--- RT-Extension-Reports/html/Reports/Elements/ShowResults	(original)
+++ RT-Extension-Reports/html/Reports/Elements/ShowResults	Thu Apr  3 21:36:20 2008
@@ -104,8 +104,8 @@
                 }
             }
 
-            use Cwd;
-            my $wc = WebChart->new( width => 800, height => 600, img_dir => getcwd . '/html/NoAuth/images/wc', web_img_dir => '/NoAuth/images/wc' );
+            my $wc = WebChart->new( width => 800, height => 600, img_dir =>
+$RT::MasonComponentRoot . '/NoAuth/images/wc', web_img_dir => '/NoAuth/images/wc' );
             my ( $seg, $file ) = $wc->render( data => \@data, type => 'bars',
 options => { legend_labels => [@$Headers[2 .. @$Headers -1]] } );
             $html .= "<div>$_:</div><div>$seg</div>";



More information about the Bps-public-commit mailing list