Only show the diff to PREV under the right circumstances
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 21:47:48 +0000 (21:47 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 21:47:48 +0000 (21:47 +0000)
browse.php

index 8feb418b16d9d9397b42b60395e3befa9d11a838..82aac545c778184b88a549034b3d3b8cb673e981 100644 (file)
@@ -42,7 +42,7 @@ if ($show['head'])
        $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $controller->revnum));
 }
 
-$show['prev'] = ($prev = $controller->cachev->fetch_prev_revision($controller->revnum));
+$show['prev'] = (($prev = $controller->cachev->fetch_prev_revision($controller->revnum)) != -1);
 if ($show['prev'])
 {
        $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, $controller->revnum, $prev['revision']));