[pmwiki-users] Require: Permanent page creator name [little bug]

Hans design5 at softflow.co.uk
Fri Feb 1 06:02:09 CST 2008

Thursday, January 31, 2008, 1:33:44 PM, imoc wrote:

> As usual, it worked again. :)

Well, not quite :-(

The functions pulls the last author name from the page's diff history.
This is usually the first auther = page creator.
But if you delete part of the history with ExpireDiff or by setting
$DiffKeepDays to a short time period, the last author in th ehistory
changes, and so does the $Creator page variable.

Thank you Anke for pointing this out!

What we really need is a Creator page attribute, written into the page
when the page is created, and set to the author, alongside the
existing one for creation time 'ctime'.
I suggest 'cauthor'.

It needs a change of code in pmwiki.php in function ReadPage:
add $Author to the global list of that function, and
change line
  if (@!$page) $page['ctime'] = $Now;
  if (@!$page) { $page['ctime'] = $Now; $page['cauthor'] = $Author; }

Maybe Pm can be persuaded to do this core change.
Then we can have a true {$Creator} or {$PageCreatedBy} page variable.


More information about the pmwiki-users mailing list