[Pmwiki-users] problem with Attach: in 0.6b4

Davis, James C. jdavis
Sat Feb 7 05:04:53 CST 2004


Upon further analysis, I have realized that the reason FmtUrlLink was changed is to accommodate parameterized intermap URIs. Therefore I would like withdraw my suggested revision to pmwiki.php and suggest the following revision to upload.php:

change lines 87 & 88

from:

SDV($InterMapUrls['Attach'],
  FmtPageName("$UploadUrlFmt$UploadPrefixFmt",$pagename));

to:

SDV($InterMapUrls['Attach'],
  FmtPageName("$UploadUrlFmt$UploadPrefixFmt$1",$pagename));

It needs the $1 to tell it where to put the file name.

Thanks,

James Davis
Network Manager
College of Business
Texas A&M University-Corpus Christi

-----Original Message-----
From: Pmwiki-users-bounces at pmichaud.com
[mailto:Pmwiki-users-bounces at pmichaud.com]On Behalf Of Davis, James C.
Sent: Saturday, February 07, 2004 5:10 AM
To: pmwiki-users at pmichaud.com
Subject: [Pmwiki-users] problem with Attach: in 0.6b4


There seems to be a problem with Attach: in 0.6b4. Files upload fine, but Attach:filename.ext yields a link to the uploads/GroupName directory instead of the actual file. Works fine with 0.5.27 on the same server.

The problem appears to be in the new FmtUrlLink function in pmwiki.php. It no longer matches   what is found after the colon. I would like to suggest the following revision to pmwiki.php to correct this:

Change line 350
from: if (preg_match('/^([^:]*):/',$ref,$match)) {
  to: if (preg_match('/^([^:]*):(.*)$/',$ref,$match)) {

and line 352
from: $ref=preg_replace("/^$pat\$/",$InterMapUrls[$match[1]],$ref);
  to: $ref=preg_replace("/^$pat\$/",$InterMapUrls[$match[1]].$match[2],$ref);

I have tried this revision, and it fixes the problem with no ill effects seen so far.

Thanks,

James Davis
Network Manager
College of Business
Texas A&M University-Corpus Christi

-- 
Pmwiki-users mailing list
Pmwiki-users at pmichaud.com
http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



More information about the pmwiki-users mailing list