Differential D21233 Diff 50569 src/applications/differential/controller/DifferentialChangesetViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialChangesetViewController.php
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | $parser = id(new DifferentialChangesetParser()) | ||||
->setLeftSideCommentMapping($left_source, $left_new); | ->setLeftSideCommentMapping($left_source, $left_new); | ||||
if ($left && $right) { | if ($left && $right) { | ||||
$parser->setOriginals($left, $right); | $parser->setOriginals($left, $right); | ||||
} | } | ||||
// Load both left-side and right-side inline comments. | // Load both left-side and right-side inline comments. | ||||
if ($revision) { | if ($revision) { | ||||
$query = id(new DifferentialInlineCommentQuery()) | $inlines = id(new DifferentialDiffInlineCommentQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withRevisionPHIDs(array($revision->getPHID())) | |||||
->withPublishableComments(true) | |||||
->withPublishedComments(true) | |||||
->needHidden(true) | ->needHidden(true) | ||||
->withRevisionPHIDs(array($revision->getPHID())); | ->execute(); | ||||
$inlines = $query->execute(); | |||||
$inlines = $query->adjustInlinesForChangesets( | $inlines = mpull($inlines, 'newInlineCommentObject'); | ||||
$inlines, | |||||
$old, | $inlines = id(new PhabricatorInlineCommentAdjustmentEngine()) | ||||
$new, | ->setViewer($viewer) | ||||
$revision); | ->setRevision($revision) | ||||
->setOldChangesets($old) | |||||
->setNewChangesets($new) | |||||
->setInlines($inlines) | |||||
->execute(); | |||||
} else { | } else { | ||||
$inlines = array(); | $inlines = array(); | ||||
} | } | ||||
if ($left_new) { | if ($left_new) { | ||||
$inlines = array_merge( | $inlines = array_merge( | ||||
$inlines, | $inlines, | ||||
$this->buildLintInlineComments($left)); | $this->buildLintInlineComments($left)); | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |