[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 2231 Revision 2232
361 my $graph = shift; 361 my $graph = shift;
362 my $extension = ($WWPlot::use_png) ? '.png' : '.gif'; 362 my $extension = ($WWPlot::use_png) ? '.png' : '.gif';
363 my $fileName = $graph->imageName . $extension; 363 my $fileName = $graph->imageName . $extension;
364 my $filePath = convertPath("gif/$fileName"); 364 my $filePath = convertPath("gif/$fileName");
365 $filePath = &surePathToTmpFile( $filePath ); 365 $filePath = &surePathToTmpFile( $filePath );
366 # Check to see if we already have this graph, or if we have to make it
367 if( not -e $filePath # does it exist?
368 or ((stat "$templateDirectory"."$main::envir{fileName}")[9] > (stat $filePath)[9]) # source has changed
369 or $graph->imageName =~ /Undefined_Set/) { # problems from SetMaker and its ilk should always be redone
366 #createFile($filePath, $main::tmp_file_permission, $main::numericalGroupID); 370 #createFile($filePath, $main::tmp_file_permission, $main::numericalGroupID);
367 local(*OUTPUT); # create local file handle so it won't overwrite other open files. 371 local(*OUTPUT); # create local file handle so it won't overwrite other open files.
368 open(OUTPUT, ">$filePath")||warn ("$0","Can't open $filePath<BR>",""); 372 open(OUTPUT, ">$filePath")||warn ("$0","Can't open $filePath<BR>","");
369 chmod( 0777, $filePath); 373 chmod( 0777, $filePath);
370 print OUTPUT $graph->draw|| warn("$0","Can't print graph to $filePath<BR>",""); 374 print OUTPUT $graph->draw|| warn("$0","Can't print graph to $filePath<BR>","");
371 close(OUTPUT)||warn("$0","Can't close $filePath<BR>",""); 375 close(OUTPUT)||warn("$0","Can't close $filePath<BR>","");
376 }
372 $filePath; 377 $filePath;
373} 378}
374 379
375 380
376 381

Legend:
Removed from v.2231  
changed lines
  Added in v.2232

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9