--- html.php.orig 2007-01-31 16:41:43.000000000 +0100 +++ html.php 2007-01-31 18:18:28.000000000 +0100 @@ -449,6 +449,164 @@ global $INFO; global $conf; global $lang; + $revisions = getRevisions($ID, $first, $conf['recent']+1); + if(count($revisions)==0 && $first!=0){ + $first=0; + $revisions = getRevisions($ID, $first, $conf['recent']+1);; + } + $hasNext = false; + if (count($revisions)>$conf['recent']) { + $hasNext = true; + array_pop($revisions); // remove extra log entry + } + + $date = @date($conf['dformat'],$INFO['lastmod']); + //print ''; + print p_locale_xhtml('revisions'); + if ($revisions){ + print '

'.$ID.'

'; + print '
'; + print ''; + print ''; + print ' + = COMPARE TO CURRENT VERSION +
+ + + + + + + + + +
Select
Any Two:
Compare to
Current Version:
Edited on:View Page Version:Editor\'s comments (if any):Edited by:
+ +
'; + } + + if($INFO['exists'] && $first==0){ + if ( (isset($INFO['meta']) && isset($INFO['meta']['last_change']) && $INFO['meta']['last_change']['type']==='e') ){ // if minor revision, italic + print ''; + } + else { + print ''; + } + print ''; + } + print ' '; + print ''; + + print ''; + } + $checked = false; + + foreach($revisions as $rev){ + $date = date($conf['dformat'],$rev); + $info = getRevisionInfo($ID,$rev,true); + if ($info['type']===e) { // if minor revision, italic + print ''; + } + else { + print ''; + } + print ''; + print ''; + print ''; + print ''; + } + else{ + print ''; + print ''; + print ''; + print ''; + print ''; + } + + print ''; + + } + if ($revisions){ + print '
'; + if ($revisions) { + print ''; + print ''; + if ($revisions){ + print '('.$lang['current'].')'; + } + print ''; + print $date; + print 'current'; + print ' '; + print $INFO['sum']; + print ''; + print $INFO['editor']; + print ''; + print '
'; + + if(@file_exists(wikiFN($ID,$rev))){ + if( !$checked ){ + print ''; + $checked = true; + } + else{ + print ''; + } + print ' '; + $p = array(); + $p['src'] = DOKU_BASE.'lib/images/diff.png'; + $p['border'] = 0; + $p['width'] = 15; + $p['height'] = 11; + $p['title'] = $lang['diff']; + $p['alt'] = $lang['diff']; + $att = buildAttributes($p); + print ""; + print ' '; + print $date; + print 'older version '; + print $date; + print 'older version'; + print htmlspecialchars($info['sum']); + print ''; + + if($info['user']){ + print $info['user']; + }else{ + print $info['ip']; + } + print '
'; + } + + print ''; + +} + +/** + * list old revisions + * + * @author Andreas Gohr + * @author Ben Coburn + */ +function html_revisions_old($first=0){ + global $ID; + global $INFO; + global $conf; + global $lang; /* we need to get one additionally log entry to be able to * decide if this is the last page or is there another one. * see html_recent() @@ -467,11 +625,23 @@ $date = @date($conf['dformat'],$INFO['lastmod']); print p_locale_xhtml('revisions'); - print '