From 461f608b5c3fdccec90ab97ff38c0acbbc69ffc1 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 Apr 2011 12:32:08 -0700 Subject: [PATCH] Fix diff-of-diffs to respect the right-hand-side diff. --- .../revisionview/DifferentialRevisionViewController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php b/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php index 6d359f94ba..3a1c988959 100644 --- a/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php @@ -44,7 +44,14 @@ class DifferentialRevisionViewController extends DifferentialController { } $diff_vs = $request->getInt('vs'); + $target = end($diffs); + $target_id = $request->getInt('id'); + if ($target_id) { + if (isset($diffs[$target_id])) { + $target = $diffs[$target_id]; + } + } $diffs = mpull($diffs, null, 'getID'); if (empty($diffs[$diff_vs])) {