[pmwiki-users] $LastModifiedHost sometimes incorrect

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 15 11:45:44 CST 2005


On Tue, Feb 15, 2005 at 05:15:04PM +0100, romat2 wrote:
> I wanted to show also IP address in RecentChanges. So I've made this
> modification in my local config - added ($LastModifiedHost):
> 
> $RecentChangesFmt = array(
>   'Main.AllRecentChanges' =>
>     '* [[$Group.$Name]]  . . . $CurrentTime $[by] $AuthorLink
> ($LastModifiedHost)',
>   '$Group.RecentChanges' =>
>     '* [[$Group/$Name]]  . . . $CurrentTime $[by] $AuthorLink
> ($LastModifiedHost)');
> 
> But the IP address is not always correct. Sometimes it is empty (),
> sometimes it shows an IP address of another user. Where could be the
> problem?

PmWiki simply gets its $LastModifiedHost value from the webserver's
REMOTE_ADDR environment variable, so if that variable isn't being
set properly then it could explain it.  

Actually, now that I think about it, the RecentChanges code might
be using the address from the previous post (if any) when substituting
$LastModifiedHost.  That would explain the blank and incorrect
entries -- that's probably it.

Pm



More information about the pmwiki-users mailing list