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

Fixing the badges query, yet again

Summary: Forgot a more efficient way to get badge from award

Test Plan: Badges on user profiles should still show up with awarder handle on the back of the card

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

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

+7 -7
+7 -7
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 190 190 ->execute(); 191 191 $awards = mpull($awards, null, 'getBadgePHID'); 192 192 193 - $badge_phids = mpull($awards, 'getBadgePHID'); 194 - $badges = id(new PhabricatorBadgesQuery()) 195 - ->setViewer($viewer) 196 - ->withPHIDs($badge_phids) 197 - ->withStatuses(array(PhabricatorBadgesBadge::STATUS_ACTIVE)) 198 - ->execute(); 199 - $badges = mpull($badges, null, 'getPHID'); 193 + $badges = array(); 194 + foreach ($awards as $award) { 195 + $badge = $award->getBadge(); 196 + if ($badge->getStatus() == PhabricatorBadgesBadge::STATUS_ACTIVE) { 197 + $badges[$award->getBadgePHID()] = $badge; 198 + } 199 + } 200 200 } 201 201 202 202 if (count($badges)) {