1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 23:01:04 +01:00

Fix DifferentialRevisionEditor handling of actorPHID after D3645

Summary: `actorPHID` no longer gets set or exists.

Test Plan: Updated a revision without fataling.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3684
This commit is contained in:
epriestley 2012-10-11 14:34:16 -07:00
parent d6c12b6518
commit 29bdc3ffc5

View file

@ -142,7 +142,7 @@ final class DifferentialRevisionEditor extends PhabricatorEditor {
} }
protected function getActorPHID() { protected function getActorPHID() {
return $this->actorPHID; return $this->getActor()->getPHID();
} }
public function isNewRevision() { public function isNewRevision() {
@ -293,7 +293,7 @@ final class DifferentialRevisionEditor extends PhabricatorEditor {
$this->reviewers, $this->reviewers,
array_keys($rem['rev']), array_keys($rem['rev']),
array_keys($add['rev']), array_keys($add['rev']),
$this->actorPHID); $this->getActorPHID());
// We want to attribute new CCs to a "reasonPHID", representing the reason // We want to attribute new CCs to a "reasonPHID", representing the reason
// they were added. This is either a user (if some user explicitly CCs // they were added. This is either a user (if some user explicitly CCs
@ -306,18 +306,18 @@ final class DifferentialRevisionEditor extends PhabricatorEditor {
if (empty($new['ccs'][$phid])) { if (empty($new['ccs'][$phid])) {
$reasons[$phid] = $xscript_phid; $reasons[$phid] = $xscript_phid;
} else { } else {
$reasons[$phid] = $this->actorPHID; $reasons[$phid] = $this->getActorPHID();
} }
} }
foreach ($rem['ccs'] as $phid => $ignored) { foreach ($rem['ccs'] as $phid => $ignored) {
if (empty($new['ccs'][$phid])) { if (empty($new['ccs'][$phid])) {
$reasons[$phid] = $this->actorPHID; $reasons[$phid] = $this->getActorPHID();
} else { } else {
$reasons[$phid] = $xscript_phid; $reasons[$phid] = $xscript_phid;
} }
} }
} else { } else {
$reasons = $this->actorPHID; $reasons = $this->getActorPHID();
} }
self::alterCCs( self::alterCCs(