From 2154f17b3d7b7c4a47aee4ec49669f9a952f2e7c Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Tue, 19 May 2015 15:22:41 -0700 Subject: [PATCH] Transactions - fix bug adding people to projects Summary: Fixes T8264. Broken in D12929. Sweep all the applyBuiltin implementations and always break; rather than return Test Plan: added myself to a project successfully (showed up as a member) Reviewers: epriestley, chad Subscribers: Korvin, epriestley Maniphest Tasks: T6403, T8264 Differential Revision: https://secure.phabricator.com/D12940 --- src/applications/audit/editor/PhabricatorAuditEditor.php | 2 +- .../differential/editor/DifferentialTransactionEditor.php | 2 +- .../project/editor/PhabricatorProjectTransactionEditor.php | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php index c628286a92..b2fd9d84b2 100644 --- a/src/applications/audit/editor/PhabricatorAuditEditor.php +++ b/src/applications/audit/editor/PhabricatorAuditEditor.php @@ -200,7 +200,7 @@ final class PhabricatorAuditEditor $state, $phid); } - return; + break; } return parent::applyBuiltinExternalTransaction($object, $xaction); diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index d195d91833..0a02dec209 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -609,7 +609,7 @@ final class DifferentialTransactionEditor $state, $phid); } - return; + break; } return parent::applyBuiltinExternalTransaction($object, $xaction); diff --git a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php index b85c127241..d449b62801 100644 --- a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php +++ b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php @@ -163,11 +163,7 @@ final class PhabricatorProjectTransactionEditor PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction) { - $old = $xaction->getOldValue(); - $new = $xaction->getNewValue(); - switch ($xaction->getTransactionType()) { - case PhabricatorTransactions::TYPE_EDGE: $edge_type = $xaction->getMetadataValue('edge:type'); switch ($edge_type) { @@ -220,7 +216,7 @@ final class PhabricatorProjectTransactionEditor } break; } - return; + break; } return parent::applyBuiltinExternalTransaction($object, $xaction);