[pmwiki-users] Version 2.2.0-beta22 - directives (reported by Marc)
Andrew Fyfe
andrew at neptune-one.net
Wed Jan 17 12:46:09 CST 2007
Jiri Hladůvka / OBUTEX wrote:
> Hi all,
> in http://www.pmwiki.org/wiki/PmWiki/ChangeLog
> stays in Version 2.2.0-beta22
> * Allow multiple lines for markup:, wiki:, and page: template directives
> (reported by Marc)
>
> I tried to find more info in PITS and could not find any contribution
> from Marc
> nor a link in his Profiles page.
> Can someone to send me the link where I can learn more ?
>
> Best regards,
> Jiri
>
>
I think this is the change it's referring to:
> @@ -951,12 +952,12 @@
> }
> return;
> }
> - if (preg_match("/^markup:(.*)$/",$x,$match))
> - { print MarkupToHTML($pagename,$match[1]); return; }
> - if (preg_match('/^wiki:(.+)$/', $x, $match))
> - { PrintWikiPage($pagename, $match[1], 'read'); return; }
> - if (preg_match('/^page:(.+)$/', $x, $match))
> - { PrintWikiPage($pagename, $match[1], ''); return; }
> + if (substr($x, 0, 7) == 'markup:')
> + { print MarkupToHTML($pagename, substr($x, 7)); return; }
> + if (substr($x, 0, 5) == 'wiki:')
> + { PrintWikiPage($pagename, substr($x, 5), 'read'); return; }
> + if (substr($x, 0, 5) == 'page:')
> + { PrintWikiPage($pagename, substr($x, 5), ''); return; }
> echo $x;
> }
But all the change does (as far as I can see) is make use of substr
instead of preg_match. (substr takes less time than preg_match for this
simple match).
Andrew
Ooops I must remember to use reply to all.
More information about the pmwiki-users
mailing list