Recent Changes - Search:




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

Question answered by this recipe

How can I use a separate password for deleting pages?


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.


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. :-)


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


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 August 12, 2015, at 02:39 PM