From 88f522e9425377c55c77b6a6dad1d5080a2adf75 Mon Sep 17 00:00:00 2001 From: andi Date: Wed, 11 May 2005 21:12:29 +0200 Subject: only show IP when username is not available darcs-hash:20050511191229-9977f-86608b464b474e36ff1b4a059e2a0d88996537df.gz --- inc/common.php | 6 +++++- inc/html.php | 32 +++++++++++++++++++------------- 2 files changed, 24 insertions(+), 14 deletions(-) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 963595d8d..2253402b4 100644 --- a/inc/common.php +++ b/inc/common.php @@ -67,7 +67,11 @@ function pageinfo(){ $info['user'] = $revinfo['user']; $info['sum'] = $revinfo['sum']; $info['editor'] = $revinfo['ip']; - if($revinfo['user']) $info['editor'].= ' ('.$revinfo['user'].')'; + if($revinfo['user']){ + $info['editor'] = $revinfo['user']; + }else{ + $info['editor'] = $revinfo['ip']; + } return $info; } diff --git a/inc/html.php b/inc/html.php index 0b88d813a..c49a2b220 100644 --- a/inc/html.php +++ b/inc/html.php @@ -368,6 +368,7 @@ function html_locked($ip){ global $ID; global $conf; global $lang; + global $INFO; $locktime = filemtime(wikiFN($ID).'.lock'); $expire = @date($conf['dformat'], $locktime + $conf['locktime'] ); @@ -375,7 +376,7 @@ function html_locked($ip){ print p_locale_xhtml('locked'); print ''; } @@ -405,10 +406,9 @@ function html_revisions(){ print ''.$ID.' '; print $INFO['sum']; - print ' ('; - print $INFO['ip']; - if($INFO['user']) print ' '.$INFO['user']; - print ') '; + print ' '; + print $INFO['editor']; + print ' '; print '('.$lang['current'].')'; print ''; @@ -429,10 +429,13 @@ function html_revisions(){ print ''.$ID.' '; print htmlspecialchars($info['sum']); - print ' ('; - print $info['ip']; - if($info['user']) print ' '.$info['user']; - print ')'; + print ' '; + if($info['user']){ + print $info['user']; + }else{ + print $info['ip']; + } + print ''; print ''; } @@ -468,10 +471,13 @@ function html_recent(){ print html_wikilink($id,$id); print ' '.htmlspecialchars($recents[$id]['sum']); - print ' ('; - print $recents[$id]['ip']; - if($recents[$id]['user']) print ' '.$recents[$id]['user']; - print ')'; + print ' '; + if($recents[$id]['user']){ + print $recents[$id]['user']; + }else{ + print $recents[$id]['ip']; + } + print ''; print ''; } -- cgit v1.2.3