[pmwiki-users] undelete recipe

The Editor editor at fast.st
Wed Jun 20 05:38:25 CDT 2007


On 6/18/07, Ben Stallings <ben at interdependentweb.com> wrote:
> Hi, folks.  I'm thinking of writing a new recipe (independent of
> DataQuery, ZAP, et al.) to facilitate restoring deleted pages.  Here are
> the specifications I'm considering.  Please let me know if you have
> anything to add.
>
> * Recipe will work with the default PmWiki deletion scheme, where
> deleted pages are named Group.Name-del0123456, where 0123456 is a UNIX
> timestamp.
>
> * Deleted pages will continue to be hidden from unprivileged users.
>
> * Users with admin privileges will be able to pagelist (search) and view
> deleted records.  (Most likely I'll accomplish this with a new PageStore
> object.)
>
> I haven't decided on the process for restoring deleted records.  I guess
> I envision that when you edit a deleted record, its contents go into the
> editor for the _undeleted_ page... that is, if you edit
> Group.Name-del0123456, you will find yourself editing Group.Name, so
> that simply saving the changes will restore the page.  But then if a
> page with that name exists, the contents of the two will need to be
> merged, like two users edit the same page at once, so that you can
> resolve any discrepancies between the two versions before saving.
>
> Does that sound good?  Any suggestions about how I should go about it?
> Thanks in advance.  --Ben S.


Ben the other question you need to answer is what to do when there are
multiple deletions for the same page, each with a different timestamp.
Do you only make the most recent one available, or gove them a choice
of restoring any of the deleted versions (Pm's preference).

I had planned to add this into ZAP but Pm suggested a much simpler
solution I though was better, and I just never got around to working
out an implementation. I'll have to see if I can find the post. But
basically it involved renaming a page instead of deleting it as usual,
and then blocking that specific pagename from view by non privileged
users. To restore you simply rename it back. I think it's a cleaner
solution.

Anyway, you might check the archives for his post. If you can't find
it I'll look.

Cheers,
Dan



More information about the pmwiki-users mailing list