[pmwiki-users] Exporting PmWiki page history
Petko Yotov
5ko at 5ko.fr
Thu Jan 21 09:51:27 CST 2016
On 2016-01-20 06:10, Ryan Varick wrote:
> The reason I am writing is because *I could not get $HandleAuth to work
> with my recipe*. Since the recipe uses ReadPage and RestorePage
> directly,
> it does not respect security settings.
>
> Is $HandleAuth['export'] = 'admin' not the appropriate way to set a
> safe
> default for my recipe? Am I missing something?
Your function needs to use RetrieveAuthPage(), for example:
function YourHandleActionFunction($pagename, $auth='admin') {
$page = RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT);
if (!$page) { Abort("?cannot YourAction $pagename"); }
# do something with $page
}
See http://www.pmwiki.org/wiki/PmWiki/Functions#RetrieveAuthPage about
the parameters.
Petko
---
Change log : http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes : http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade : http://www.pmwiki.org/wiki/PmWiki/Upgrades
More information about the pmwiki-users
mailing list