Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15380435
D21232.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D21232.diff
View Options
diff --git a/src/applications/differential/controller/DifferentialRevisionInlinesController.php b/src/applications/differential/controller/DifferentialRevisionInlinesController.php
--- a/src/applications/differential/controller/DifferentialRevisionInlinesController.php
+++ b/src/applications/differential/controller/DifferentialRevisionInlinesController.php
@@ -24,11 +24,12 @@
$revision_uri = $revision->getURI();
$revision_title = $revision->getTitle();
- $query = id(new DifferentialInlineCommentQuery())
+ $inlines = id(new DifferentialDiffInlineCommentQuery())
->setViewer($viewer)
- ->needHidden(true)
- ->withRevisionPHIDs(array($revision->getPHID()));
- $inlines = $query->execute();
+ ->withRevisionPHIDs(array($revision->getPHID()))
+ ->withPublishedComments(true)
+ ->execute();
+ $inlines = mpull($inlines, 'newInlineCommentObject');
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($revision_monogram, $revision_uri);
diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php
--- a/src/applications/diffusion/controller/DiffusionCommitController.php
+++ b/src/applications/diffusion/controller/DiffusionCommitController.php
@@ -418,7 +418,8 @@
$inlines = id(new DiffusionDiffInlineCommentQuery())
->setViewer($viewer)
->withCommitPHIDs(array($commit->getPHID()))
- ->withVisibleComments(true)
+ ->withPublishedComments(true)
+ ->withPublishableComments(true)
->execute();
$inlines = mpull($inlines, 'newInlineCommentObject');
diff --git a/src/applications/diffusion/controller/DiffusionDiffController.php b/src/applications/diffusion/controller/DiffusionDiffController.php
--- a/src/applications/diffusion/controller/DiffusionDiffController.php
+++ b/src/applications/diffusion/controller/DiffusionDiffController.php
@@ -103,7 +103,8 @@
->setViewer($viewer)
->withCommitPHIDs(array($commit->getPHID()))
->withPathIDs(array($path_id))
- ->withVisibleComments(true)
+ ->withPublishedComments(true)
+ ->withPublishableComments(true)
->execute();
$inlines = mpull($inlines, 'newInlineCommentObject');
diff --git a/src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php b/src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php
--- a/src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php
+++ b/src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php
@@ -5,7 +5,7 @@
private $fixedStates;
private $needReplyToComments;
- private $visibleComments;
+ private $publishedComments;
private $publishableComments;
abstract protected function buildInlineCommentWhereClauseParts(
@@ -22,13 +22,13 @@
return $this;
}
- public function withVisibleComments($with_visible) {
- $this->visibleComments = $with_visible;
+ public function withPublishableComments($with_publishable) {
+ $this->publishableComments = $with_publishable;
return $this;
}
- public function withPublishableComments($with_publishable) {
- $this->publishableComments = $with_publishable;
+ public function withPublishedComments($with_published) {
+ $this->publishedComments = $with_published;
return $this;
}
@@ -51,32 +51,30 @@
$show_published = false;
$show_publishable = false;
- if ($this->visibleComments !== null) {
- if (!$this->visibleComments) {
+ if ($this->publishableComments !== null) {
+ if (!$this->publishableComments) {
throw new Exception(
pht(
- 'Querying for comments that are not visible is '.
+ 'Querying for comments that are "not publishable" is '.
'not supported.'));
}
- $show_published = true;
$show_publishable = true;
}
- if ($this->publishableComments !== null) {
- if (!$this->publishableComments) {
+ if ($this->publishedComments !== null) {
+ if (!$this->publishedComments) {
throw new Exception(
pht(
- 'Querying for comments that are not publishable is '.
+ 'Querying for comments that are "not published" is '.
'not supported.'));
}
- $show_publishable = true;
+ $show_published = true;
}
if ($show_publishable || $show_published) {
$clauses = array();
if ($show_published) {
- // Published comments are always visible.
$clauses[] = qsprintf(
$conn,
'%T.transactionPHID IS NOT NULL',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 3:04 AM (3 w, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382154
Default Alt Text
D21232.diff (4 KB)
Attached To
Mode
D21232: Move the "Inline List" view to "DiffInlineCommentQuery"
Attached
Detach File
Event Timeline
Log In to Comment