Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15367976
D17732.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D17732.diff
View Options
diff --git a/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php b/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
--- a/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
+++ b/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
@@ -36,8 +36,7 @@
$offset = $request->getValue('offset');
$query = id(new ConpherenceThreadQuery())
- ->setViewer($user)
- ->needParticipantCache(true);
+ ->setViewer($user);
if ($ids) {
$conpherences = $query
@@ -57,7 +56,7 @@
->setLimit($limit)
->setOffset($offset)
->execute();
- $conpherence_phids = array_keys($participation);
+ $conpherence_phids = mpull($participation, 'getConpherencePHID');
$query->withPHIDs($conpherence_phids);
$conpherences = $query->execute();
$conpherences = array_select_keys($conpherences, $conpherence_phids);
diff --git a/src/applications/conpherence/controller/ConpherenceListController.php b/src/applications/conpherence/controller/ConpherenceListController.php
--- a/src/applications/conpherence/controller/ConpherenceListController.php
+++ b/src/applications/conpherence/controller/ConpherenceListController.php
@@ -151,6 +151,7 @@
->withParticipantPHIDs(array($viewer->getPHID()))
->setLimit($limit)
->execute();
+ $all_participation = mpull($all_participation, null, 'getConpherencePHID');
return array(
'all_participation' => $all_participation,
diff --git a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php
--- a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php
+++ b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php
@@ -12,6 +12,7 @@
->withParticipantPHIDs(array($user->getPHID()))
->setLimit(5)
->execute();
+ $participant_data = mpull($participant_data, null, 'getConpherencePHID');
if ($participant_data) {
$conpherences = id(new ConpherenceThreadQuery())
diff --git a/src/applications/conpherence/query/ConpherenceParticipantQuery.php b/src/applications/conpherence/query/ConpherenceParticipantQuery.php
--- a/src/applications/conpherence/query/ConpherenceParticipantQuery.php
+++ b/src/applications/conpherence/query/ConpherenceParticipantQuery.php
@@ -25,22 +25,7 @@
$this->buildOrderClause($conn),
$this->buildLimitClause($conn));
- $participants = $table->loadAllFromArray($data);
-
- // TODO: Fix this, it's bogus.
- if ('garbage') {
- if (count($this->participantPHIDs) !== 1) {
- throw new Exception(
- pht(
- 'This query only works when querying for exactly one participant '.
- 'PHID!'));
- }
- // This will throw results away if we aren't doing a query for exactly
- // one participant PHID.
- $participants = mpull($participants, null, 'getConpherencePHID');
- }
-
- return $participants;
+ return $table->loadAllFromArray($data);
}
protected function buildWhereClause(AphrontDatabaseConnection $conn) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 10:50 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7596554
Default Alt Text
D17732.diff (3 KB)
Attached To
Mode
D17732: Fix improper filtering behavior in ConpherenceParticipantQuery
Attached
Detach File
Event Timeline
Log In to Comment