[pmwiki-users] Markup engine global improvement
Joachim Durchholz
jo at durchholz.org
Wed Jul 6 09:55:06 CDT 2005
Patrick R. Michaud wrote:
> On Wed, Jul 06, 2005 at 04:19:49PM +0200, Joachim Durchholz wrote:
>
>> It turned out that the class is missing an important abstraction,
>> namely page renames. Writing a variation of that class would break
>> at least the Rename recipe.
>
> Why do you claim this? AFAICT the rename recipe uses ReadPage() and
> WritePage(), the same as the rest of PmWiki (and as it should).
> The generic approach for renaming a page is
>
> function RenamePage($oldname, $newname) {
> global $WikiDir;
> $page = ReadPage($oldname); # read old page
> WritePage($newname, $page); # save with new name
> $WikiDir->delete($oldname); # remove old page
> }
>
> and this should work with any PageStore instance.
The Rename recipe may have been updated since, but last time I looked,
pages were renamed at the file level. The recipe even had an explicit
warning that it would work only with the standard page store (that's how
I became aware of the issue in the first place).
Regards,
Jo
More information about the pmwiki-users
mailing list