[Pmwiki-users] Some thoughts on delete and tables

Patrick R. Michaud pmichaud at pobox.com
Tue Apr 29 19:05:28 CDT 2003

On Tue, 29 Apr 2003, Jonathan Scott Duff wrote:

> On Tue, Apr 29, 2003 at 11:35:08AM -0400, Ross Kowalski wrote:
> > I was deleting some unused pages a minute ago and noticed that once a 
> > page is deleted, I am returned to the main:welcome page.  Would it make 
> > more sense to return the user to the group:welcome page after a 
> > deletion?
> Sounds a like a good thing to me.   I wonder if there's a variable or
> something where you can define what page you go to after a page
> deletion?

Well, delete is actually an "edit" operation, so after posting an edit 
PmWiki tries to return the browser back to the page that was just
edited.  In this case the page no longer exists, so the redirect routine
intercepts it and redirects the user to the default page for the wiki.

I can certainly create a variable to allow the wiki administrator to
define the page where a user should be sent after deleting a page,
or after being redirected to a non-existing page.  By default this 
would probably be the starting page for the group.  However an 
administrator could certainly use the variable to jump to any
page in the system.

> > There is also currently no confirmation for a deletion, which on one 
> > hand eliminates the "are you sure you want to delet this?" dialog box 
> > that comes up on windows boxes when deleting, but I often find myself 
> > checking that the file was truely deleted anyway.  
> So ... you don't trust that the deletion tool is doing what it says it
> does?  Or you just need some assurance that the wiki page was actually
> deleted and taking you to the main page isn't it?

Using the scheme I described above an administrator could certainly redirect
the user to a 'delete confirmed' page.

> But you sparked an idea.  Maybe there should be a
> tool that comes with PmWiki that allows for undeletion.   

...to be developed only upon substantial demand.  On one hand it's good
that deletion requires some outside assistance to be undone--it makes
people think just a bit before deleting pages.  

As with search capabilities, I really do want to avoid creating full 
file-management capabilities in PHP scripts.  There are better scripts 
and tools for these purposes without reinventing them all in PmWiki.


More information about the pmwiki-users mailing list