@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace remaining pseudo-query methods on AuditInlineComment

Summary: Ref T13513. Another step closer to the light.

Test Plan: Created, edited, deleted, replied to, and submitted inline comments in Diffusion.

Maniphest Tasks: T13513

Differential Revision: https://secure.phabricator.com/D21230

+22 -45
-43
src/applications/audit/storage/PhabricatorAuditInlineComment.php
··· 34 34 return $this->getStorageObject(); 35 35 } 36 36 37 - public static function loadID($id) { 38 - $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( 39 - 'id = %d', 40 - $id); 41 - if (!$inlines) { 42 - return null; 43 - } 44 - 45 - return head(self::buildProxies($inlines)); 46 - } 47 - 48 - public static function loadPHID($phid) { 49 - $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( 50 - 'phid = %s', 51 - $phid); 52 - if (!$inlines) { 53 - return null; 54 - } 55 - return head(self::buildProxies($inlines)); 56 - } 57 - 58 - public static function loadPublishedComments( 59 - PhabricatorUser $viewer, 60 - $commit_phid) { 61 - 62 - $inlines = id(new DiffusionDiffInlineCommentQuery()) 63 - ->setViewer($viewer) 64 - ->withCommitPHIDs(array($commit_phid)) 65 - ->withHasTransaction(true) 66 - ->execute(); 67 - 68 - return self::buildProxies($inlines); 69 - } 70 - 71 - private static function buildProxies(array $inlines) { 72 - $results = array(); 73 - foreach ($inlines as $key => $inline) { 74 - $results[$key] = self::newFromModernComment( 75 - $inline); 76 - } 77 - return $results; 78 - } 79 - 80 37 public static function newFromModernComment( 81 38 PhabricatorAuditTransactionComment $comment) { 82 39
+22 -2
src/applications/diffusion/controller/DiffusionInlineCommentController.php
··· 42 42 } 43 43 44 44 protected function loadComment($id) { 45 - return PhabricatorAuditInlineComment::loadID($id); 45 + $viewer = $this->getViewer(); 46 + $inline = id(new DiffusionDiffInlineCommentQuery()) 47 + ->setViewer($viewer) 48 + ->withIDs(array($id)) 49 + ->executeOne(); 50 + 51 + if ($inline) { 52 + $inline = $inline->newInlineCommentObject(); 53 + } 54 + 55 + return $inline; 46 56 } 47 57 48 58 protected function loadCommentByPHID($phid) { 49 - return PhabricatorAuditInlineComment::loadPHID($phid); 59 + $viewer = $this->getViewer(); 60 + $inline = id(new DiffusionDiffInlineCommentQuery()) 61 + ->setViewer($viewer) 62 + ->withPHIDs(array($phid)) 63 + ->executeOne(); 64 + 65 + if ($inline) { 66 + $inline = $inline->newInlineCommentObject(); 67 + } 68 + 69 + return $inline; 50 70 } 51 71 52 72 protected function loadCommentForEdit($id) {