--
TWiki:Main/SeanLazar
- 06 May 2010
I have found a bug in
AttachmentListPlugin.pm:
$viewfileUrl does not give the current version. rev= in the URL always appears empty.
Line 397 needs to be changed.
Line 397 as it is now:
my $attrVersion = $fileData->{attachment}->{Version} || '';
Should be changed to:
my $attrVersion = $fileData->{attachment}->{version} || '';
Relevant code block:
if ( $s =~ m/\$viewfileUrl/ ) {
my $attrVersion = $fileData->{attachment}->{Version} || '';
my $viewfileUrl =
TWiki::Func::getScriptUrl( $fileData->{web}, $fileData->{topic},
"viewfile" )
. "?rev=$attrVersion&filename=$fileData->{name}";
$s =~ s/\$viewfileUrl/$viewfileUrl/g;
}
--
TWiki:Main/SeanLazar
- 06 May 2010
Thanks Sean! See my comment in
TWiki:Plugins/AttachmentListPluginDev
.
--
TWiki:Main.PeterThoeny
- 06 May 2010