Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

DeleteAction

Summary: Use a separate password for deleting pages
Version: 2005-08-10
Prerequisites: PmWiki 2.x
Status:
Maintainer: Pm, Klonk
Discussion: DeleteAction-Talk

Question answered by this recipe

How can I use a separate password for deleting pages?

Answer

The deletepage.phpΔ script adds an "?action=delete" which can be used to password-protect the removal of pages from the wiki. In addition, the script disables PmWiki's default page deletion mechanism, although this can be restored.

Discussion

By default, pages in PmWiki can be deleted by editing the page and changing the contents to the single word "delete" (controlled by the $DeleteKeyPattern variable). The deletepage.phpΔ script changes this so that pages are deleted via a separate ?action=delete added to the end of the URL, which can have a separate password from editing and other operations.

Note that as with the default page deletion, the pages are not entirely removed from the site's wiki.d/ directory -- the page file is simply renamed to include a timestamp. This is to guard against accidental or malicious page deletions via the PmWiki interface. Deleted pages are not completely removed until a wiki administrator deletes them from the wiki.d directory.

The deletepage.phpΔ script is enabled at Test.DeletePage for those who wish to see its effects. (It's not enabled for testing on this page for somewhat obvious reasons. :-)

Contributors

  • Pm, 2005-01-21
  • Klonk, 2005-08-10, set $DefaultPassword for this action, so it works now also with 2.0beta54

Comments

See discussion at DeleteAction-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on September 02, 2012, at 10:56 PM