Home > Uncategorized > “Compare with previous” link is broken in websvn

“Compare with previous” link is broken in websvn

The bug:

http://websvn.tigris.org/issues/show_bug.cgi?id=20

Read more for a simple patch.

--- listing.php.old 2007-10-01 17:12:47.000000000 +0200
+++ listing.php 2007-10-01 17:13:18.000000000 +0200
@@ -293,8 +293,7 @@
createDirLinks($rep, $ppath, $passrev, $showchanged);
$vars["curdirloglink"] = "<a href=\"${logurl}rev=$passrev&amp;sc=$showchanged&amp;isdir=1\">${lang["VIEWLOG"]}</a>";
if (isset($history[1])) {
-       $vars["curdircomplink"] = "<a href=\"${compurl}compare%5B%5D=".urlencode($history[1]["path"])."@".$history[1]["rev"]."&amp;compare%5B%5D=".urlencode($history[0]["path"])."@".$history[0]["rev"]."\">${lang["DIFFPREV"]}</a>";
-       $vars["curdircomplink"] = "<a href=\"${compurl}compare%5B%5D=".urlencode($history[1]["path"])."@".$history[1]["rev"]."&amp;compare%5B%5D=".urlencode($history[0]["path"])."@".$history[0]["rev"]."\">${lang["DIFFPREV"]}</a>";
+       $vars["curdircomplink"] = "<a href=\"${compurl}compare%5B%5D=".urlencode($history[1]["path"])."@".($passrev-1)."&amp;compare%5B%5D=".urlencode($history[0]["path"])."@".$passrev."\">${lang["DIFFPREV"]}</a>";
} else
$vars["curdircomplink"] = "";

Advertisements
Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: