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:
parent
4f018488ae
commit
3d7a1d936c
1 changed files with 4 additions and 2 deletions
|
@ -88,6 +88,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
$last_base = null;
|
$last_base = null;
|
||||||
foreach ($data as $row) {
|
foreach ($data as $row) {
|
||||||
|
|
||||||
|
$diff = $row['obj'];
|
||||||
$name = phutil_escape_html($row['name']);
|
$name = phutil_escape_html($row['name']);
|
||||||
$id = phutil_escape_html($row['id']);
|
$id = phutil_escape_html($row['id']);
|
||||||
|
|
||||||
|
@ -148,21 +149,22 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
$class = null;
|
$class = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['obj']) {
|
if ($diff) {
|
||||||
$lint = self::renderDiffLintStar($row['obj']);
|
$lint = self::renderDiffLintStar($row['obj']);
|
||||||
$unit = self::renderDiffUnitStar($row['obj']);
|
$unit = self::renderDiffUnitStar($row['obj']);
|
||||||
$lint_message = self::getDiffLintMessage($diff);
|
$lint_message = self::getDiffLintMessage($diff);
|
||||||
$unit_message = self::getDiffUnitMessage($diff);
|
$unit_message = self::getDiffUnitMessage($diff);
|
||||||
$lint_title = ' title="'.phutil_escape_html($lint_message).'"';
|
$lint_title = ' title="'.phutil_escape_html($lint_message).'"';
|
||||||
$unit_title = ' title="'.phutil_escape_html($unit_message).'"';
|
$unit_title = ' title="'.phutil_escape_html($unit_message).'"';
|
||||||
|
$base = $this->renderBaseRevision($diff);
|
||||||
} else {
|
} else {
|
||||||
$lint = null;
|
$lint = null;
|
||||||
$unit = null;
|
$unit = null;
|
||||||
$lint_title = null;
|
$lint_title = null;
|
||||||
$unit_title = null;
|
$unit_title = null;
|
||||||
|
$base = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$base = $this->renderBaseRevision($diff);
|
|
||||||
if ($last_base !== null && $base !== $last_base) {
|
if ($last_base !== null && $base !== $last_base) {
|
||||||
// TODO: Render some kind of notice about rebases.
|
// TODO: Render some kind of notice about rebases.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue