[Pmwiki-users] Password protection for "Page Revisions"

Benedikt Hochstrasser bhoc
Sat Dec 6 06:33:43 CST 2003

Hi all,
I am about to set up pmwiki for my home page. Which means that I don't have a "read"
password, but passwords for everything else.
What bugged me is that everyone and their brother can look at the page revisions -
something I don't think is appropriate for every public site.
To make a long story short, I edited pmwiki.php like this (function HandleDiff):

function HandleDiff($pagename) {
  global $TimeFmt,$PageDiffFmt,$PageDiffFootFmt,$SysPatchCmd,$DiffIsEdit;
  if (!isset($DiffIsEdit) || $DiffIsEdit==0) { 
    $page = RetrieveAuthPage($pagename,"read"); }
  else { $page = RetrieveAuthPage($pagename,"edit"); }

Now I can add a variable "$DiffIsEdit" in my local.php, and when it is non-zero I
am prompted for the edit password when I click on "Page Revisions".

Or did I miss some already existing tweak?


More information about the pmwiki-users mailing list