From 14208c6069acfa00f6746dbf0e7167b8f0bbd3f0 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 12 Jan 2006 18:12:33 +0000 Subject: [PATCH] Bringing view.php up to speed --- templates/default/view.tpl | 4 ++-- view.php | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/templates/default/view.tpl b/templates/default/view.tpl index 08b21c6..1733337 100644 --- a/templates/default/view.tpl +++ b/templates/default/view.tpl @@ -10,9 +10,9 @@ $header
{@"Revision Information"}
-
{@"Revision"}: $logmsg[rev]
+
{@"Revision"}: $logmsg[revision]
{@"Author"}: $logmsg[author]
-
{@"Date"}: $logmsg[date] $logmsg[timezone]
+
{@"Date"}: $logmsg[date]
{@"Message"}: $logmsg[message_clean]
diff --git a/view.php b/view.php index 30937a3..42f9f5b 100644 --- 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)); -- 2.43.5