Item8233: Image maps don't work if $attachPath is used

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: DirectedGraphPlugin
Branches:
Reported By: Foswiki:Main.AndreasVoegele
Waiting For:
Last Change By: GeorgeClark
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
 

ItemTemplate edit

Summary Image maps don't work if $attachPath is used
ReportedBy Foswiki:Main.AndreasVoegele
Codebase 1.0.6
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component DirectedGraphPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins DirectedGraphPlugin:37c4bf6eec56 DirectedGraphPlugin:cb20b16ad338
ReleasedIn
Topic revision: r5 - 30 Nov 2009, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy