[pmwiki-users] Subpages-Recipe-Error on Windows (W2K)

WvL apollo13 at freenet.de
Thu Mar 16 06:16:24 CST 2006


i tried to apply the Subpages-Recipe ...
 PmWiki can't process your request
 Cannot write page to Profiles.Sylvia*Halloween (wiki.d/Profiles.Sylvia*Halloween)...changes not saved

 PHP Warning: fopen(wiki.d/Profiles.Sylvia*Halloween,new) 
 [function.fopen]: failed to open stream: Invalid argument in ...\pmwiki.php on line 720 

i think, it's because Windows does'nt allow the
"subpage-markup"-character '*' in filenames.

Would someone please help me, changing the regular expression in subpages.php:
<?php if (!defined('PmWiki')) exit();
SDV($EnableDisambiguation,1);
$PageNameChars = '-~\\*[:alnum:]';
$NamePattern = '[[:upper:]\\d][\\w]*(?:[-~\\*]\\w+)*';
Markup('[[*','<links','/\[\[(\*)([^\|\]]+)(?:\|\s*([^\]]+))?\]\]/e',
    "'$1[[' . preg_replace('/\*.*$/','',FmtPageName('\$Name',\$pagename)) .
    PSS('$1$2 |') . (('$3'=='') ? '$2' : '$3') . ']]'");
if ($EnableDisambiguation==1)
    Markup('[[(*)','<links','/\[\[([^\*]+)(\*[^\|\]]+)\]\]/','[[$1($2)]]');
elseif ($EnableDisambiguation==2)
    Markup('[[(*)','<links','/\[\[([^\*]+)\*([^\|\]]+)\]\]/','[[$1*$2 | $2]] ([[$1]])');
?>

"subpage-markup"-character '#' or '~' would be fine,
if no conflicts arise with other pmwiki-markup?

Thanks in advance,
Wolfgang





More information about the pmwiki-users mailing list