Bringing view.php up to speed
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 12 Jan 2006 18:12:33 +0000 (18:12 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 12 Jan 2006 18:12:33 +0000 (18:12 +0000)
templates/default/view.tpl
view.php

index 08b21c66afd5149f8f407676b49fc00ac7a80bc7..17333378f6526d97e51d3240a8f334b1ccddfb3b 100644 (file)
@@ -10,9 +10,9 @@ $header
 
 <div class="head">{@"Revision Information"}</div>
 <div class="content">
-       <div><strong>{@"Revision"}:</strong> $logmsg[rev]</div>
+       <div><strong>{@"Revision"}:</strong> $logmsg[revision]</div>
        <div><strong>{@"Author"}:</strong> $logmsg[author]</div>
-       <div><strong>{@"Date"}:</strong> $logmsg[date] $logmsg[timezone]</div>
+       <div><strong>{@"Date"}:</strong> $logmsg[date]</div>
        <div><strong>{@"Message"}:</strong> $logmsg[message_clean]</div>
 </div>
 
index 30937a35e263dadbb4510b6219967cd6fdeb43db..42f9f5bd371d962a2718320b6992d6bd21404255 100644 (file)
--- a/view.php
+++ b/view.php
@@ -29,16 +29,18 @@ $navbar = $viewsvn->paths->construct_breadcrumb($viewsvn->paths->path);
 
 // ###################################################################
 
+$latest = $cachev->fetch_node($viewsvn->paths->relpath);
+
 $link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->revstr, $viewsvn->paths->path);
 
-$show['head'] = ($viewsvn->svn->common->fetch_head_rev($viewsvn->paths->path) != $viewsvn->paths->revnum AND $viewsvn->paths->revnum != 'HEAD');
+$show['head'] = ($latest['revision'] != $viewsvn->paths->revnum AND $viewsvn->paths->revnum != 'HEAD');
 if ($show['head'])
 {
        $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $viewsvn->paths->path);
        $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->revnum), $viewsvn->paths->path);
 }
 
-$show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($viewsvn->paths->path, $viewsvn->paths->revnum)) != -1 ? true : false);
+$show['prev'] = ($prev = $cachev->fetch_prev_revision($viewsvn->paths->relpath, $viewsvn->paths->revnum));
 if ($show['prev'])
 {
        $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->revnum, $prev), $viewsvn->paths->path);
@@ -46,10 +48,11 @@ if ($show['prev'])
 
 // ###################################################################
 
-$logmsg = $viewsvn->svn->common->fetch_log($viewsvn->paths->path, $viewsvn->paths->revnum);
+$logmsg = $cachev->fetch_revision($latest['revision']);
 unset($logmsg['files']);
 
 $logmsg['message_clean'] = $viewsvn->svn->format_log_message($logmsg['message']);
+$logmsg['date'] = $viewsvn->svn->format_date_string($logmsg['dateline']);
 
 $catdata = implode("\n", $viewsvn->svn->cat($viewsvn->paths->repos, $viewsvn->paths->relpath, $viewsvn->paths->revnum));