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

Differential - fix bug destroying diffs

Summary: I think this was a "hacked" sub thing that never got updated when we switched to a real editor? I am not 100% sure how these methods are used, so please let me know if I should expand my test plan. Fixes T6659.

Test Plan: made a diff from the web ui, looked up the phid from mysql, ran bin/remove destroy <phid>, and it worked!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6659

Differential Revision: https://secure.phabricator.com/D10911
This commit is contained in:
Bob Trahan 2014-12-01 14:46:25 -08:00
parent e872f79f61
commit 1716861ad8

View file

@ -421,25 +421,17 @@ final class DifferentialDiff
public function getApplicationTransactionEditor() { public function getApplicationTransactionEditor() {
if (!$this->getRevisionID()) {
return null; return new DifferentialDiffEditor();
}
return $this->getRevision()->getApplicationTransactionEditor();
} }
public function getApplicationTransactionObject() { public function getApplicationTransactionObject() {
if (!$this->getRevisionID()) { return $this;
return null;
}
return $this->getRevision();
} }
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
if (!$this->getRevisionID()) { return new DifferentialDiffTransaction();
return null;
}
return $this->getRevision()->getApplicationTransactionTemplate();
} }