Page MenuHomePhabricator

D17447.id41944.diff
No OneTemporary

D17447.id41944.diff

diff --git a/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php b/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php
--- a/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php
+++ b/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php
@@ -15,6 +15,7 @@
->setViewer($viewer)
->withIDs(array($id))
->needRecipients(true)
+ ->setRecipientLimit(250)
->executeOne();
if (!$badge) {
return new Aphront404Response();
diff --git a/src/applications/badges/query/PhabricatorBadgesQuery.php b/src/applications/badges/query/PhabricatorBadgesQuery.php
--- a/src/applications/badges/query/PhabricatorBadgesQuery.php
+++ b/src/applications/badges/query/PhabricatorBadgesQuery.php
@@ -8,6 +8,7 @@
private $qualities;
private $statuses;
private $recipientPHIDs;
+ private $recipientLimit = 100;
private $needRecipients;
@@ -47,6 +48,11 @@
return $this;
}
+ public function setRecipientLimit($limit) {
+ $this->recipientLimit = $limit;
+ return $this;
+ }
+
protected function loadPage() {
return $this->loadStandardPage($this->newResultObject());
}
@@ -64,6 +70,7 @@
$query = id(new PhabricatorBadgesAwardQuery())
->setViewer($this->getViewer())
->withBadgePHIDs(mpull($badges, 'getPHID'))
+ ->setLimit($this->recipientLimit)
->execute();
$awards = mgroup($query, 'getBadgePHID');

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 22, 2:45 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7800284
Default Alt Text
D17447.id41944.diff (1 KB)

Event Timeline