[pmwiki-users] undelete recipe

Ben Wilson dausha at gmail.com
Wed Jun 20 05:53:05 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.

>From one Ben to another, I think this recipe is long in coming. The
un-delete interface should list all deleted versions, giving the
administrator the choice for which version to undelete. This would
naturally allow the administrator to browse (and look at history?)
each deleted page.

One other thing to think about is what to do when there is an
undeleted page of the same name? I would think the preference would be
to take the last version of the deleted page and use that to build a
new version of the current page. Just as editing a page creates a
revision artifact, so too should the undelete. An alternative is to
delete the current page and copy back the old, deleted page

Options such as authorization level to undelete (e.g. admin/edit) and
whether to go directly into an edit context (or to just overwrite the
contents and be done with it) should probably be configurable. But, I
know you probably already planned that.

-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill



More information about the pmwiki-users mailing list