[pmwiki-users] Version 2.2.0-beta22 - directives (reported by Marc)

Jiri Hladůvka / OBUTEX admin at obutex.com
Wed Jan 17 13:29:49 CST 2007


Thank to Andrew and all who responded my Q.
I have to start (already for the 5th time) to study PHP :-)

Jiri

Andrew Fyfe napsal(a):
> 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.
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
> __________ Informace od NOD32 1985 (20070117) __________
>
> Tato zprava byla proverena antivirovym systemem NOD32.
> http://www.nod32.cz
>
>
>
>   

-- 
OBUTEX s.r.o
Ing.Jiří Hladůvka
Zlatovská 22
911 01 Trenčín

tel.: +421 (0)32 6587000
mailto:admin at obutex.com

http://www.obutex.com






More information about the pmwiki-users mailing list