From de3be1a8e6b6740774525e6bfd39a9437e224844 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 28 Aug 2005 23:07:21 +0000 Subject: [PATCH] - silence cat call in svnlib::common::isdir - revision numbers now view file on diff.php --- diff.php | 14 ++++---------- includes/svnlib.php | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/diff.php b/diff.php index b5a18e4..0376bbf 100644 --- a/diff.php +++ b/diff.php @@ -30,14 +30,7 @@ if (empty($viewsvn->in['low'])) $diff = new SVNDiff($repos, $relpath, $viewsvn->in['low'], $viewsvn->in['high']); -if ($viewsvn->svn->common->isdir($path)) -{ - $viewpg = 'browse'; -} -else -{ - $viewpg = 'view'; -} +$isdir = (bool)$viewsvn->svn->common->isdir($path); echo << @@ -74,10 +67,11 @@ foreach ($diff->fetch() AS $filename => $file) { if ($key == 'hunk' AND isset($line['old'])) { + $filepath = ($isdir ? $path . $filename : $path); echo ' - r' . $viewsvn->in['low'] . ' - r' . $viewsvn->in['high'] . ' + r' . $viewsvn->in['low'] . ' + r' . $viewsvn->in['high'] . '   '; continue; diff --git a/includes/svnlib.php b/includes/svnlib.php index a35da19..cfa15ff 100644 --- a/includes/svnlib.php +++ b/includes/svnlib.php @@ -333,7 +333,7 @@ class SVNCommon */ function isdir($path) { - $output = $this->registry->svn->cat($this->registry->paths->fetch_repos($path), $this->registry->paths->fetch_path($path), 'HEAD'); + $output = @$this->registry->svn->cat($this->registry->paths->fetch_repos($path), $this->registry->paths->fetch_path($path), 'HEAD'); $output = implode("\n", $output); if (strpos($output, 'svn:') === false) { -- 2.43.5