1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 05:42:40 +01:00

Fix issue where all rows in "Revision Update History" render the same base

Summary: We were not correctly updating $diff as we iterated through the loop.

Test Plan: Viewed a revision several diffs that had differing base revision.

Reviewers: fratrik, btrahan

Reviewed By: fratrik

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1523
This commit is contained in:
epriestley 2012-01-31 12:07:41 -08:00
parent 4f018488ae
commit 3d7a1d936c

View file

@ -88,6 +88,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
$last_base = null;
foreach ($data as $row) {
$diff = $row['obj'];
$name = phutil_escape_html($row['name']);
$id = phutil_escape_html($row['id']);
@ -148,21 +149,22 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
$class = null;
}
if ($row['obj']) {
if ($diff) {
$lint = self::renderDiffLintStar($row['obj']);
$unit = self::renderDiffUnitStar($row['obj']);
$lint_message = self::getDiffLintMessage($diff);
$unit_message = self::getDiffUnitMessage($diff);
$lint_title = ' title="'.phutil_escape_html($lint_message).'"';
$unit_title = ' title="'.phutil_escape_html($unit_message).'"';
$base = $this->renderBaseRevision($diff);
} else {
$lint = null;
$unit = null;
$lint_title = null;
$unit_title = null;
$base = null;
}
$base = $this->renderBaseRevision($diff);
if ($last_base !== null && $base !== $last_base) {
// TODO: Render some kind of notice about rebases.
}