From 1716861ad8ee6ab4e68e48fdea20acf04bbde1b1 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Mon, 1 Dec 2014 14:46:25 -0800 Subject: [PATCH] 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 , and it worked! Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6659 Differential Revision: https://secure.phabricator.com/D10911 --- .../differential/storage/DifferentialDiff.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/applications/differential/storage/DifferentialDiff.php b/src/applications/differential/storage/DifferentialDiff.php index c16a9f85fd..abb677287f 100644 --- a/src/applications/differential/storage/DifferentialDiff.php +++ b/src/applications/differential/storage/DifferentialDiff.php @@ -421,25 +421,17 @@ final class DifferentialDiff public function getApplicationTransactionEditor() { - if (!$this->getRevisionID()) { - return null; - } - return $this->getRevision()->getApplicationTransactionEditor(); + + return new DifferentialDiffEditor(); } public function getApplicationTransactionObject() { - if (!$this->getRevisionID()) { - return null; - } - return $this->getRevision(); + return $this; } public function getApplicationTransactionTemplate() { - if (!$this->getRevisionID()) { - return null; - } - return $this->getRevision()->getApplicationTransactionTemplate(); + return new DifferentialDiffTransaction(); }