[pmwiki-users] includexml recipe questions

Dominique Faure dominique.faure at gmail.com
Tue May 22 15:09:47 CDT 2007


On 5/22/07, Jean-Fabrice [gmail] <jeanfabrice at gmail.com> wrote:
> Hi,
>
> In the includexml.php recipe someone (or maybe Dominique), add the
> following test in order to solve issue with UrlApprovals  :
> if (strrpos($f, 'action=approvesites') !== false) return Keep($f);
>
> Shouldn't it be (using strpos instead of strrpos) :
> if (strpos($f, 'action=approvesites') !== false) return Keep($f);
>
> ??
>
> I have an other question on this recipe :
> I protected my attachments using $EnableDirectDownload = 0, thus
> ending in Attach:file converted to ?action=download&upname=file
>
> (:includexml xml=Attach:somefile.xml xsl=somestylesheet.xsl:)
> internally generates URL links for the Attach statement (using the
> MakeLink function), then gets the appropriate files using
> file_get_contents. The issue is that the ampersand in
> ?action=download&upname=file is converted by MakeLink to
> ?action=download&amp;upname=file. Raw passed to file_get_contents,
> this ends with a 404 not found.
>
> JF
>

Well, this recipe initially written more or less as a proof of concept
really needs some housekeeping and I've desperately not enough time
for this now, but it's put near the top of the to-do stack ;)

Dominique



More information about the pmwiki-users mailing list