diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 2bbcfd1ecb..23cfa1b906 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -903,9 +903,6 @@ final class DifferentialRevisionViewController extends DifferentialController { ->needComments(true) ->execute(); - $engine = id(new PhabricatorMarkupEngine()) - ->setViewer($viewer); - $timeline = id(new DifferentialTransactionView()) ->setUser($viewer) ->setObjectPHID($revision->getPHID()) diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php index b02c6119ad..cc04b5512d 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php @@ -149,23 +149,23 @@ class PhabricatorApplicationTransactionView extends AphrontView { } protected function getOrBuildEngine() { - if ($this->engine) { - return $this->engine; - } + if (!$this->engine) { + $field = PhabricatorApplicationTransactionComment::MARKUP_FIELD_COMMENT; - $field = PhabricatorApplicationTransactionComment::MARKUP_FIELD_COMMENT; - - $engine = id(new PhabricatorMarkupEngine()) - ->setViewer($this->getUser()); - foreach ($this->transactions as $xaction) { - if (!$xaction->hasComment()) { - continue; + $engine = id(new PhabricatorMarkupEngine()) + ->setViewer($this->getUser()); + foreach ($this->transactions as $xaction) { + if (!$xaction->hasComment()) { + continue; + } + $engine->addObject($xaction->getComment(), $field); } - $engine->addObject($xaction->getComment(), $field); - } - $engine->process(); + $engine->process(); - return $engine; + $this->engine = $engine; + } + + return $this->engine; } private function buildChangeDetailsLink(