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

Davis, James C. jdavis
Sat Feb 7 04:10:17 CST 2004


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



More information about the pmwiki-users mailing list