Page MenuHomePhabricator

D17732.diff
No OneTemporary

D17732.diff

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

Mime Type
text/plain
Expires
Sun, Mar 16, 12:41 AM (6 d, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7596554
Default Alt Text
D17732.diff (3 KB)

Event Timeline