1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 14:30:56 +01:00

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
This commit is contained in:
epriestley 2018-12-12 15:37:51 -08:00
parent aba9945923
commit 5c99163b7c
2 changed files with 10 additions and 11 deletions

View file

@ -30,11 +30,9 @@ final class ReleephGetBranchesConduitAPIMethod extends ReleephConduitAPIMethod {
foreach ($projects as $project) {
$repository = $project->getRepository();
$branches = $project->loadRelatives(
id(new ReleephBranch()),
'releephProjectID',
'getID',
'isActive = 1');
$branches = id(new ReleephBranch())->loadAllWhere(
'releephProjectID = %d AND isActive = 1',
$project->getID());
foreach ($branches as $branch) {
$full_branch_name = $branch->getName();

View file

@ -22,16 +22,17 @@ final class ReleephDiffSizeFieldSpecification
}
$diff_rev = $requested_object;
$diffs = $diff_rev->loadRelatives(
new DifferentialDiff(),
'revisionID',
'getID',
'creationMethod <> "commit"');
$diffs = id(new DifferentialDiff())->loadAllWhere(
'revisionID = %d AND creationMethod != %s',
$diff_rev->getID(),
'commit');
$all_changesets = array();
$most_recent_changesets = null;
foreach ($diffs as $diff) {
$changesets = $diff->loadRelatives(new DifferentialChangeset(), 'diffID');
$changesets = id(new DifferentialChangeset())->loadAllWhere(
'diffID = %d',
$diff->getID());
$all_changesets += $changesets;
$most_recent_changesets = $changesets;
}