Item11470: Parameter linkattachments doesn't work / is inconsistent

Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: DirectedGraphPlugin
Branches: trunk
Reported By: ChristianZiemski
Waiting For:
Last Change By: GeorgeClark

The parameter linkattachments="on|off" doesn't work.

After some exploring I found an inconsistency and an (intermediate) fix:

In lib/Foswiki/Plugins/

in line 292 it's named "LINKATTACHMENTS" like in the documentation:
    # Get the default link file attachment default
    $linkFilesDefault =
      || '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
Topic revision: r5 - 21 Dec 2013, 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