diff --git a/src/applications/differential/parser/changeset/DifferentialChangesetParser.php b/src/applications/differential/parser/changeset/DifferentialChangesetParser.php index fe0878b8c9..b8ace11c4d 100644 --- a/src/applications/differential/parser/changeset/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/changeset/DifferentialChangesetParser.php @@ -899,22 +899,66 @@ class DifferentialChangesetParser { } } + $this->comments = msort($this->comments, 'getID'); + $old_comments = array(); + $new_comments = array(); + foreach ($this->comments as $comment) { + if ($this->isCommentOnRightSideWhenDisplayed($comment)) { + $new_comments[] = $comment; + } else { + $old_comments[] = $comment; + } + } + + $html_old = array(); + $html_new = array(); + foreach ($old_comments as $comment) { + $xhp = $this->renderInlineComment($comment); + $html_old[] = + ''. + $xhp. + ''; + } + foreach ($new_comments as $comment) { + $xhp = $this->renderInlineComment($comment); + $html_new[] = + ''. + $xhp. + ''; + } + + $changset_id = $this->changeset->getID(); + if (!$old) { + $th_old = ''; + } + else { + $th_old = '1'; + } + if (!$cur) { + $th_new = ''; + } + else { + $th_new = '1'; + } + $output = $this->renderChangesetTable( $this->changeset, ''. - ''. + $th_old. ''. '
'. $old. '
'. ''. - ''. + $th_new. ''. '
'. $cur. '
'. ''. - ''); + ''. + implode('', $html_old). + implode('', $html_new)); return $output; case DifferentialChangeType::FILE_DIRECTORY: