The attachment table gets confused if you upload a file that has spaced
WikiNames, i.e. if you upload
C:\path\file with WikiName
Fix:
In function
getAttachAttr of
attach script add this:
( $before, $item, $after ) = split( /<(?:\/)*TwkFileName>/, $set );
if( ( $item ) && ( $item eq $fileName ) ) {
( $before, $filePath, $after ) = split( /<(?:\/)*TwkFilePath>/, $set );
if( ! $filePath ) { $filePath = ""; }
$filePath =~ s///go;
if( $1 ) { $filePath = $1; } else { $filePath = ""; }
$filePath =~ s/\%NOP\%//goi; # delete placeholder that prevents WikiLinks
( $before, $fileSize, $after ) = split( /<(?:\/)*TwkFileSize>/, $set );
In function
updateAttachment of
upload script add this:
my $before="", $item="", $lcItem="", $after="", $set="", $ins="", $comp="";
my $lcFileName = lc $fileName;
my $fileIcon = filenameToIcon( $fileName );
# prevent links for $filePath, i.e. "\some\File with WikiName.txt"
$filePath =~ s/([\(\-\*\s]+)([A-Z]+)/$1\%NOP\%$2/go;
my $result = $atTableBefore;
my $found = 0;
Commited to
TWikiAlphaRelease.
--
PeterThoeny - 04 Dec 2000