Item11470: Parameter linkattachments doesn't work / is inconsistent
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Hi!
The parameter linkattachments="on|off" doesn't work.
After some exploring I found an inconsistency and an (intermediate) fix:
In
lib/Foswiki/Plugins/DirectedGraphPlugin.pm
in line 292 it's named "LINKATTACHMENTS" like in the documentation:
# Get the default link file attachment default
$linkFilesDefault =
Foswiki::Func::getPreferencesValue('DIRECTEDGRAPHPLUGIN_LINKATTACHMENTS')
|| 'on';
but in line 418 it's named "linkfiles"
my $linkFiles = $params{linkfiles} || $linkFilesDefault;
So one has either
- to use
linkfiles="off"
instead of linkattachments="off"
in the <dot> tag
- or change
$params{linkfiles}
to $params{linkattachments}
in above line
Additionally in line 865 I changed the if() as follows to get it finally working:
#if ($linkFiles) { # doesn't work
if ( $linkFiles =~ m/on/ ) { # is working
--
ChristianZiemski - 24 Jan 2012
Since linkattachments is the documented parameter, it will be the preferred parameter. linkfiles will still work if specified, for backwards compatiblity. Switched to use
Foswiki::Func::isTrue()
to test the parameter.
--
GeorgeClark - 21 Dec 2013