this function of html.php lists the old revisions of an article:
/**
* list old revisions
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
*/
function html_revisions($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()
*/
$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 p_locale_xhtml('revisions');
print '<ul>';
if($INFO['exists'] && $first==0){
print (isset($INFO['meta']) && isset($INFO['meta']['last_change']) && $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<li class="minor">' : '<li>';
print '<div class="li">';
print $date;
print ' <img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" /> ';
print '<a class="wikilink1" href="'.wl($ID).'">'.$ID.'</a> ';
print ' – ';
print $INFO['sum'];
print ' <span class="user">';
print (empty($INFO['editor']))?('('.$lang['external_edit'].')'):$INFO['editor'];
print '</span> ';
print '('.$lang['current'].')';
print '</div>';
print '</li>';
}
foreach($revisions as $rev){
$date = date($conf['dformat'],$rev);
$info = getRevisionInfo($ID,$rev,true);
print ($info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<li class="minor">' : '<li>';
print '<div class="li">';
print $date;
if(@file_exists(wikiFN($ID,$rev))){
print ' <a href="'.wl($ID,"rev=$rev,do=diff").'">';
$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 "<img $att />";
print '</a> ';
print '<a class="wikilink1" href="'.wl($ID,"rev=$rev").'">'.$ID.'</a>';
}else{
print ' <img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" /> ';
print $ID;
}
print ' – ';
print htmlspecialchars($info['sum']);
print ' <span class="user">';
if($info['user']){
print $info['user'];
}else{
print $info['ip'];
}
print '</span>';
print '</div>';
print '</li>';
}
print '</ul>';
print '<div class="pagenav">';
$last = $first + $conf['recent'];
if ($first > 0) {
$first -= $conf['recent'];
if ($first < 0) $first = 0;
print '<div class="pagenav-prev">';
print html_btn('newer',$ID,"p",array('do' => 'revisions', 'first' => $first));
print '</div>';
}
if ($hasNext) {
print '<div class="pagenav-next">';
print html_btn('older',$ID,"n",array('do' => 'revisions', 'first' => $last));
print '</div>';
}
print '</div>';
}
unfortunatelly I'm not that deep in programming how to modify this function to list only the initial author of an article (the oldest version).
Can someone help me please?