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

Patrick R. Michaud pmichaud at pobox.com
Sun May 27 11:11:48 CDT 2007

On Sun, May 27, 2007 at 03:59:34PM +0200, Jean-Fabrice [gmail] wrote:
> This function has some warning *do not rely on the return values* in
> the core pmwiki.php code
> Is this still the case ?

It may be the case -- I'm still looking at it.  I'm trying to
decide if RetrieveAuthSection() will return just the text section
or if it needs to also return the name of the page it found.

I'm also not sure that RetrieveAuthSection() should return
text before or after running Qualify() on it, which converts
relative links and page variables into absolute ones.  

Currently RetrieveAuthSection() qualifies all text that it
retrieves, but I may decide that's better left to the caller
to do.  But if the caller is going to do that, it needs to
know the name of the page that was actually retrieved.

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

This is the one -- I'm just trying to decide exactly what
functions it should take care of directly and what it should
leave out.

> 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))

Could be... I'll check into it.



More information about the pmwiki-devel mailing list