Item8233: Image maps don't work if $attachPath is used
Priority: Normal
Current State: Closed
Released In:
Target Release:
DirectedGraphPlugin always calls readAttachment() to read the image map file. Here's a patch that calls readFile() if $attachPath is set.
--- DirectedGraphPlugin.pm.orig 2009-06-28 21:03:03.000000000 +0200
+++ DirectedGraphPlugin.pm 2009-08-07 12:36:39.000000000 +0200
@@ -666,8 +666,13 @@
if ($doMap) {
# read and format map
- my $mapfile =
- Foswiki::Func::readAttachment( $web, $topic, "$outFilename.cmapx" );
+ my $mapfile = undef;
+ if ( ($attachPath) && ($attachUrlPath) && !( $forceAttachAPI eq "on" ) ) {
+ $mapfile = Foswiki::Func::readFile( "$attachPath/$web/$topic/$outFilename.cmapx" );
+ }
+ else {
+ $mapfile = Foswiki::Func::readAttachment( $web, $topic, "$outFilename.cmapx" );
+ }
$mapfile =~
s/(<map\ id\=\")(.*?)(\"\ name\=\")(.*?)(\">)/$1$hashCode$3$hashCode$5/go;
$mapfile =~ s/[\n\r]/ /go;
--
AndreasVoegele - 07 Aug 2009
Thanks for the fix. I'll get it checked in.
--
GeorgeClark - 14 Aug 2009