From 41396b7169938033ad2fa43497d53fe53b83093d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 Sep 2006 20:54:34 +0200 Subject: don't link non-existing revisions The new changelog mechanism shows all revisions of a document, even if the old revisions are deleted (eg. by a maintenence script). This patch removes the links for non existing revisions. darcs-hash:20060925185434-7ad00-14a558ce69c4116e14d7fdfbaad052c6a7b0a4db.gz --- inc/html.php | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/inc/html.php b/inc/html.php index dd2aa2ca0..25478c280 100644 --- a/inc/html.php +++ b/inc/html.php @@ -478,6 +478,7 @@ function html_revisions($first=0){ print ''.$ID.' '; + print ' – '; print $INFO['sum']; print ' '; print $INFO['editor']; @@ -496,19 +497,25 @@ function html_revisions($first=0){ print '
'; print $date; - print ' '; - $p = array(); - $p['src'] = DOKU_BASE.'lib/images/diff.png'; - $p['width'] = 15; - $p['height'] = 11; - $p['title'] = $lang['diff']; - $p['alt'] = $lang['diff']; - $att = buildAttributes($p); - print ""; - print ' '; - - print ''.$ID.' '; + if(@file_exists(wikiFN($ID,$rev))){ + print ' '; + $p = array(); + $p['src'] = DOKU_BASE.'lib/images/diff.png'; + $p['width'] = 15; + $p['height'] = 11; + $p['title'] = $lang['diff']; + $p['alt'] = $lang['diff']; + $att = buildAttributes($p); + print ""; + print ' '; + + print ''.$ID.''; + }else{ + print ' '; + print $ID; + } + print ' – '; print htmlspecialchars($info['sum']); print ' '; if($info['user']){ @@ -600,7 +607,7 @@ function html_recent($first=0){ print ' '; print html_wikilink(':'.$recent['id'],$conf['useheading']?NULL:$recent['id']); - print ' '.htmlspecialchars($recent['sum']); + print ' – '.htmlspecialchars($recent['sum']); print ' '; if($recent['user']){ -- cgit v1.2.3