1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

diff dict API bug fix

Summary:
I didn't realize createDiffDict was a public method when I
modified it, and I broke the API call in getrevision.  This moves the
modification inside the method and reverts the method header back to
it's original form.

Test Plan: none

Reviewers: epriestley

Reviewed By: epriestley

CC: edward, aran, epriestley

Differential Revision: 883
This commit is contained in:
mgummelt 2011-08-31 17:54:45 -07:00
parent 76ac8b4196
commit a1d1c69506

View file

@ -72,15 +72,10 @@ class ConduitAPI_differential_getdiff_Method extends ConduitAPIMethod {
$changeset->attachHunks($changeset->loadHunks());
}
$properties = id(new DifferentialDiffProperty())->loadAllWhere(
'diffID = %d',
$diff_id);
return $this->createDiffDict($diff, $properties);
return $this->createDiffDict($diff);
}
public static function createDiffDict(DifferentialDiff $diff,
array $properties) {
public static function createDiffDict(DifferentialDiff $diff) {
$dict = array(
'id' => $diff->getID(),
'parent' => $diff->getParentRevisionID(),
@ -121,6 +116,9 @@ class ConduitAPI_differential_getdiff_Method extends ConduitAPIMethod {
$dict['changes'][] = $change;
}
$properties = id(new DifferentialDiffProperty())->loadAllWhere(
'diffID = %d',
$diff->getID());
foreach ($properties as $property) {
$dict['properties'][$property->getName()] = $property->getData();
}