[system] / trunk / pg / macros / dangerousMacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/dangerousMacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3501 Revision 3502
375 my $graph = shift; 375 my $graph = shift;
376 my $extension = ($WWPlot::use_png) ? '.png' : '.gif'; 376 my $extension = ($WWPlot::use_png) ? '.png' : '.gif';
377 my $fileName = $graph->imageName . $extension; 377 my $fileName = $graph->imageName . $extension;
378 my $filePath = convertPath("gif/$fileName"); 378 my $filePath = convertPath("gif/$fileName");
379 $filePath = &surePathToTmpFile( $filePath ); 379 $filePath = &surePathToTmpFile( $filePath );
380 my $refreshCachedImages = PG_restricted_eval(q!$refreshCachedImages!);
380 # Check to see if we already have this graph, or if we have to make it 381 # Check to see if we already have this graph, or if we have to make it
381 if( not -e $filePath # does it exist? 382 if( not -e $filePath # does it exist?
382 or ((stat "$templateDirectory"."$main::envir{fileName}")[9] > (stat $filePath)[9]) # source has changed 383 or ((stat "$templateDirectory"."$main::envir{fileName}")[9] > (stat $filePath)[9]) # source has changed
383 or $graph->imageName =~ /Undefined_Set/) { # problems from SetMaker and its ilk should always be redone 384 or $graph->imageName =~ /Undefined_Set/ # problems from SetMaker and its ilk should always be redone
385 or $refreshCachedImages
386 ) {
384 #createFile($filePath, $main::tmp_file_permission, $main::numericalGroupID); 387 #createFile($filePath, $main::tmp_file_permission, $main::numericalGroupID);
385 local(*OUTPUT); # create local file handle so it won't overwrite other open files. 388 local(*OUTPUT); # create local file handle so it won't overwrite other open files.
386 open(OUTPUT, ">$filePath")||warn ("$0","Can't open $filePath<BR>",""); 389 open(OUTPUT, ">$filePath")||warn ("$0","Can't open $filePath<BR>","");
387 chmod( 0777, $filePath); 390 chmod( 0777, $filePath);
388 print OUTPUT $graph->draw|| warn("$0","Can't print graph to $filePath<BR>",""); 391 print OUTPUT $graph->draw|| warn("$0","Can't print graph to $filePath<BR>","");

Legend:
Removed from v.3501  
changed lines
  Added in v.3502

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9