Log Message:
-----------
If a problem file sets $refreshCachedImages=1 inside the pg file, then
cached copies of on the fly graphics are ignored and the graphic is
regenerated.
Modified Files:
--------------
pg/macros:
dangerousMacros.pl
Revision Data
-------------
Index: dangerousMacros.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/dangerousMacros.pl,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lmacros/dangerousMacros.pl -Lmacros/dangerousMacros.pl -u -r1.35 -r1.36
--- macros/dangerousMacros.pl
+++ macros/dangerousMacros.pl
@@ -377,10 +377,13 @@
my $fileName = $graph->imageName . $extension;
my $filePath = convertPath("gif/$fileName");
$filePath = &surePathToTmpFile( $filePath );
+ my $refreshCachedImages = PG_restricted_eval(q!$refreshCachedImages!);
# Check to see if we already have this graph, or if we have to make it
if( not -e $filePath # does it exist?
or ((stat "$templateDirectory"."$main::envir{fileName}")[9] > (stat $filePath)[9]) # source has changed
- or $graph->imageName =~ /Undefined_Set/) { # problems from SetMaker and its ilk should always be redone
+ or $graph->imageName =~ /Undefined_Set/ # problems from SetMaker and its ilk should always be redone
+ or $refreshCachedImages
+ ) {
#createFile($filePath, $main::tmp_file_permission, $main::numericalGroupID);
local(*OUTPUT); # create local file handle so it won't overwrite other open files.
open(OUTPUT, ">$filePath")||warn ("$0","Can't open $filePath<BR>","");
|