From 1c123bddec28b7faaeb0d9de6da529fc20fa7501 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 12 Jan 2006 19:04:52 +0000 Subject: [PATCH] Reducing Xqueries --- blame.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blame.php b/blame.php index 863709f..2f80cad 100644 --- a/blame.php +++ b/blame.php @@ -30,16 +30,18 @@ $navbar = $viewsvn->paths->construct_breadcrumb($viewsvn->paths->path, false); // ################################################################### +$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('blame.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); -- 2.43.5