Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/storage/PhabricatorAuditInlineComment.php
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | ||||
| $id); | $id); | ||||
| if (!$inlines) { | if (!$inlines) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| return head(self::buildProxies($inlines)); | return head(self::buildProxies($inlines)); | ||||
| } | } | ||||
| public static function loadPHID($phid) { | |||||
| $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | |||||
| 'phid = %s', | |||||
| $phid); | |||||
| if (!$inlines) { | |||||
| return null; | |||||
| } | |||||
| return head(self::buildProxies($inlines)); | |||||
| } | |||||
| public static function loadDraftComments( | public static function loadDraftComments( | ||||
| PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
| $commit_phid) { | $commit_phid) { | ||||
| $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | ||||
| 'authorPHID = %s AND commitPHID = %s AND transactionPHID IS NULL | 'authorPHID = %s AND commitPHID = %s AND transactionPHID IS NULL | ||||
| AND pathID IS NOT NULL', | AND pathID IS NOT NULL', | ||||
| $viewer->getPHID(), | $viewer->getPHID(), | ||||
| ▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | final class PhabricatorAuditInlineComment | ||||
| public function setChangesetID($id) { | public function setChangesetID($id) { | ||||
| return $this->setPathID($id); | return $this->setPathID($id); | ||||
| } | } | ||||
| public function getChangesetID() { | public function getChangesetID() { | ||||
| return $this->getPathID(); | return $this->getPathID(); | ||||
| } | } | ||||
| public function setReplyToCommentPHID($phid) { | |||||
| $this->proxy->setReplyToCommentPHID($phid); | |||||
| return $this; | |||||
| } | |||||
| public function getReplyToCommentPHID() { | |||||
| return $this->proxy->getReplyToCommentPHID(); | |||||
| } | |||||
| public function setHasReplies($has_replies) { | |||||
| $this->proxy->setHasReplies($has_replies); | |||||
| return $this; | |||||
| } | |||||
| public function getHasReplies() { | |||||
| return $this->proxy->getHasReplies(); | |||||
| } | |||||
| /* -( PhabricatorMarkupInterface Implementation )-------------------------- */ | /* -( PhabricatorMarkupInterface Implementation )-------------------------- */ | ||||
| public function getMarkupFieldKey($field) { | public function getMarkupFieldKey($field) { | ||||
| return 'AI:'.$this->getID(); | return 'AI:'.$this->getID(); | ||||
| } | } | ||||
| Show All 18 Lines | |||||