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

Sort Ponder Answers by voteCount

Summary: Fixes T9207. I think this is correct? Sorts based on vote count and reverses the order of the array so higher is first.

Test Plan: Test vote ordering on a number of sample tasks.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9207

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

+2 -1
+2 -1
src/applications/ponder/controller/PonderQuestionViewController.php
··· 225 225 $xaction_groups = mgroup($xactions, 'getObjectPHID'); 226 226 $author_phids = mpull($answers, 'getAuthorPHID'); 227 227 $handles = $this->loadViewerHandles($author_phids); 228 + $answers_sort = array_reverse(msort($answers, 'getVoteCount')); 228 229 229 230 $view = array(); 230 - foreach ($answers as $answer) { 231 + foreach ($answers_sort as $answer) { 231 232 $xactions = idx($xaction_groups, $answer->getPHID(), array()); 232 233 $id = $answer->getID(); 233 234 $handle = $handles[$answer->getAuthorPHID()];