diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php index 475b0196ca..a4a68259fa 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php @@ -85,4 +85,8 @@ final class PhabricatorApplicationTransactionCommentRawController return id(new AphrontDialogResponse())->setDialog($dialog); } + public function shouldAllowPublic() { + return true; + } + } diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php index 8cb6e97390..aef52384cc 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php @@ -451,6 +451,8 @@ class PhabricatorApplicationTransactionView extends AphrontView { $event->setIsEdited(true); } + $event->setIsNormalComment(true); + // If we have a place for quoted text to go and this is a quotable // comment, pass the quote target ID to the event view. if ($this->getQuoteTargetID()) { diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php index ff53875bac..561fd1e6d8 100644 --- a/src/view/phui/PHUITimelineEventView.php +++ b/src/view/phui/PHUITimelineEventView.php @@ -22,6 +22,7 @@ final class PHUITimelineEventView extends AphrontView { private $token; private $tokenRemoved; private $quoteTargetID; + private $isNormalComment; private $quoteRef; private $reallyMajorEvent; @@ -43,6 +44,15 @@ final class PHUITimelineEventView extends AphrontView { return $this->quoteTargetID; } + public function setIsNormalComment($is_normal_comment) { + $this->isNormalComment = $is_normal_comment; + return $this; + } + + public function getIsNormalComment() { + return $this->isNormalComment; + } + public function setHideByDefault($hide_by_default) { $this->hideByDefault = $hide_by_default; return $this; @@ -547,8 +557,9 @@ final class PHUITimelineEventView extends AphrontView { 'uri' => '/transactions/quote/'.$xaction_phid.'/', 'ref' => $ref, )); + } - // if there is something to quote then there is something to view raw + if ($this->getIsNormalComment()) { $items[] = id(new PhabricatorActionView()) ->setIcon('fa-cutlery') ->setHref('/transactions/raw/'.$xaction_phid.'/')