[pmwiki-devel] $AuthorLink Bug?

Stirling Westrup sti at pooq.com
Mon Nov 13 11:20:54 CST 2006


The $AuthorLink variable only shows up in 2 places in PmWiki. Its defined in
scripts/author.php with this definition:

  SDV($AuthorLink,($Author) ? "[[~$Author]]" : '?');

And is used in pmwiki.php in the definition of $RecentChangesFmt

  $RecentChangesFmt = array(
    '$SiteGroup.AllRecentChanges' =>
      '* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]',
    '$Group.RecentChanges' =>
      '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]');

The bug appears to be in the first line, where the single quotes should be
used instead of double. Currently, if one wishes to change the value of
$Author after scripts/author.php has been run, then $AuthorLink needs to also
be redefined since it captured the then-current value of $Author when it was
defined.

There is a similar problem with $AuthorPage capturing the value of $Author and
not recomputing it when $Author changes, but I'm unsure how serious that is,
as I couldn't find any code that uses $AuthorPage.




More information about the pmwiki-devel mailing list