Revert "Make DifferentialChangesetParser explicitly map display to storage for comments"
This reverts commit a0af5b6643.
This commit is contained in:
@@ -154,12 +154,8 @@ class DifferentialChangesetViewController extends DifferentialController {
|
||||
$parser->setLeftSideCommentMapping($left_source, $left_new);
|
||||
$parser->setWhitespaceMode($request->getStr('whitespace'));
|
||||
|
||||
// Load both left-side and right-side inline comments.
|
||||
$inlines = $this->loadInlineComments(
|
||||
array($left_source, $right_source),
|
||||
$author_phid);
|
||||
|
||||
$phids = array();
|
||||
$inlines = $this->loadInlineComments($id, $author_phid);
|
||||
foreach ($inlines as $inline) {
|
||||
$parser->parseInlineComment($inline);
|
||||
$phids[$inline->getAuthorPHID()] = true;
|
||||
@@ -232,15 +228,10 @@ class DifferentialChangesetViewController extends DifferentialController {
|
||||
));
|
||||
}
|
||||
|
||||
private function loadInlineComments(array $changeset_ids, $author_phid) {
|
||||
$changeset_ids = array_unique(array_filter($changeset_ids));
|
||||
if (!$changeset_ids) {
|
||||
return;
|
||||
}
|
||||
|
||||
private function loadInlineComments($changeset_id, $author_phid) {
|
||||
return id(new DifferentialInlineComment())->loadAllWhere(
|
||||
'changesetID IN (%Ld) AND (commentID IS NOT NULL OR authorPHID = %s)',
|
||||
$changeset_ids,
|
||||
'changesetID = %d AND (commentID IS NOT NULL OR authorPHID = %s)',
|
||||
$changeset_id,
|
||||
$author_phid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user