[pmwiki-devel] RetrieveAuthSection() : can I use it ?

Jean-Fabrice [gmail] jeanfabrice at gmail.com
Sun May 27 08:59:34 CDT 2007


Hi list,

This function has some warning *do not rely on the return values* in
the core pmwiki.php code
Is this still the case ?

My need is to retrieve part of page based on the usual #begin#end
schema. Is there any other function better suited for that ?

By the way, I wrote a little code using this function and I get a
strange behaviour when the included section is located at the very
beginning of the page.
$text = RetrieveAuthSection($pagename,$args))

if $args = #xml and the current page contains a [[#xml]] section, it's
ok (i.e $text contains the data of the section)

if $args = MyGroup/MyPage#xml and MyGroup/MyPage starts with a
[[#xml]] section, then $text contains #xml (the name of the anchor)
plus the data
NB : this does happen if the section is the first data in
MyGroup/MyPage. If MyGroup/MyPage starts with a newline or any text,
it doesn't happen.

Jean-Fabrice



More information about the pmwiki-devel mailing list