Tags:
archive_me1Add my vote for this tag create new tag
, view all tags
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

TopicClassification:
BugResolved
Topic revision: r1 - 05 Dec 2000 - 03:53:02 - PeterThoeny
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback