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

Remove application callers to "LiskDAO->loadRelatives()"

Summary: Ref T13218. See that task for some discussion. `loadRelatives()` is like `loadAllWhere(...)` except that it does enormous amounts of weird magic which we've moved away from.

Test Plan: Did not test whatsoever since these changes are in Releeph.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13218

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

+10 -11
+3 -5
src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
··· 30 30 foreach ($projects as $project) { 31 31 $repository = $project->getRepository(); 32 32 33 - $branches = $project->loadRelatives( 34 - id(new ReleephBranch()), 35 - 'releephProjectID', 36 - 'getID', 37 - 'isActive = 1'); 33 + $branches = id(new ReleephBranch())->loadAllWhere( 34 + 'releephProjectID = %d AND isActive = 1', 35 + $project->getID()); 38 36 39 37 foreach ($branches as $branch) { 40 38 $full_branch_name = $branch->getName();
+7 -6
src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
··· 22 22 } 23 23 $diff_rev = $requested_object; 24 24 25 - $diffs = $diff_rev->loadRelatives( 26 - new DifferentialDiff(), 27 - 'revisionID', 28 - 'getID', 29 - 'creationMethod <> "commit"'); 25 + $diffs = id(new DifferentialDiff())->loadAllWhere( 26 + 'revisionID = %d AND creationMethod != %s', 27 + $diff_rev->getID(), 28 + 'commit'); 30 29 31 30 $all_changesets = array(); 32 31 $most_recent_changesets = null; 33 32 foreach ($diffs as $diff) { 34 - $changesets = $diff->loadRelatives(new DifferentialChangeset(), 'diffID'); 33 + $changesets = id(new DifferentialChangeset())->loadAllWhere( 34 + 'diffID = %d', 35 + $diff->getID()); 35 36 $all_changesets += $changesets; 36 37 $most_recent_changesets = $changesets; 37 38 }