@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.

Move the "Inline List" view to "DiffInlineCommentQuery"

Summary: Ref T13513. Continue removing usage sites for the obsolete "DifferentialInlineCommentQuery".

Test Plan: Viewed the inline list in Differential, saw sensible inlines.

Maniphest Tasks: T13513

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

+21 -20
+5 -4
src/applications/differential/controller/DifferentialRevisionInlinesController.php
··· 24 24 $revision_uri = $revision->getURI(); 25 25 $revision_title = $revision->getTitle(); 26 26 27 - $query = id(new DifferentialInlineCommentQuery()) 27 + $inlines = id(new DifferentialDiffInlineCommentQuery()) 28 28 ->setViewer($viewer) 29 - ->needHidden(true) 30 - ->withRevisionPHIDs(array($revision->getPHID())); 31 - $inlines = $query->execute(); 29 + ->withRevisionPHIDs(array($revision->getPHID())) 30 + ->withPublishedComments(true) 31 + ->execute(); 32 + $inlines = mpull($inlines, 'newInlineCommentObject'); 32 33 33 34 $crumbs = $this->buildApplicationCrumbs(); 34 35 $crumbs->addTextCrumb($revision_monogram, $revision_uri);
+2 -1
src/applications/diffusion/controller/DiffusionCommitController.php
··· 418 418 $inlines = id(new DiffusionDiffInlineCommentQuery()) 419 419 ->setViewer($viewer) 420 420 ->withCommitPHIDs(array($commit->getPHID())) 421 - ->withVisibleComments(true) 421 + ->withPublishedComments(true) 422 + ->withPublishableComments(true) 422 423 ->execute(); 423 424 $inlines = mpull($inlines, 'newInlineCommentObject'); 424 425
+2 -1
src/applications/diffusion/controller/DiffusionDiffController.php
··· 103 103 ->setViewer($viewer) 104 104 ->withCommitPHIDs(array($commit->getPHID())) 105 105 ->withPathIDs(array($path_id)) 106 - ->withVisibleComments(true) 106 + ->withPublishedComments(true) 107 + ->withPublishableComments(true) 107 108 ->execute(); 108 109 $inlines = mpull($inlines, 'newInlineCommentObject'); 109 110
+12 -14
src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php
··· 5 5 6 6 private $fixedStates; 7 7 private $needReplyToComments; 8 - private $visibleComments; 8 + private $publishedComments; 9 9 private $publishableComments; 10 10 11 11 abstract protected function buildInlineCommentWhereClauseParts( ··· 22 22 return $this; 23 23 } 24 24 25 - public function withVisibleComments($with_visible) { 26 - $this->visibleComments = $with_visible; 25 + public function withPublishableComments($with_publishable) { 26 + $this->publishableComments = $with_publishable; 27 27 return $this; 28 28 } 29 29 30 - public function withPublishableComments($with_publishable) { 31 - $this->publishableComments = $with_publishable; 30 + public function withPublishedComments($with_published) { 31 + $this->publishedComments = $with_published; 32 32 return $this; 33 33 } 34 34 ··· 51 51 $show_published = false; 52 52 $show_publishable = false; 53 53 54 - if ($this->visibleComments !== null) { 55 - if (!$this->visibleComments) { 54 + if ($this->publishableComments !== null) { 55 + if (!$this->publishableComments) { 56 56 throw new Exception( 57 57 pht( 58 - 'Querying for comments that are not visible is '. 58 + 'Querying for comments that are "not publishable" is '. 59 59 'not supported.')); 60 60 } 61 - $show_published = true; 62 61 $show_publishable = true; 63 62 } 64 63 65 - if ($this->publishableComments !== null) { 66 - if (!$this->publishableComments) { 64 + if ($this->publishedComments !== null) { 65 + if (!$this->publishedComments) { 67 66 throw new Exception( 68 67 pht( 69 - 'Querying for comments that are not publishable is '. 68 + 'Querying for comments that are "not published" is '. 70 69 'not supported.')); 71 70 } 72 - $show_publishable = true; 71 + $show_published = true; 73 72 } 74 73 75 74 if ($show_publishable || $show_published) { 76 75 $clauses = array(); 77 76 78 77 if ($show_published) { 79 - // Published comments are always visible. 80 78 $clauses[] = qsprintf( 81 79 $conn, 82 80 '%T.transactionPHID IS NOT NULL',