mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
Transactions - move TYPE_SUBSCRIBERS to require optional implementation
Summary: Ref T6403. This one was pretty easy since no one does anything custom with subscribers. Test Plan: subscribed / unscribed to a random commit ("audit"). joined / left, watched / unwatched a project Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6403 Differential Revision: https://secure.phabricator.com/D12930
This commit is contained in:
parent
16c8d44c37
commit
18e0ee0791
7 changed files with 2 additions and 14 deletions
|
@ -116,7 +116,6 @@ final class PhabricatorAuditEditor
|
|||
|
||||
switch ($xaction->getTransactionType()) {
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorAuditActionConstants::ACTION:
|
||||
case PhabricatorAuditActionConstants::INLINE:
|
||||
case PhabricatorAuditActionConstants::ADD_AUDITORS:
|
||||
|
@ -133,7 +132,6 @@ final class PhabricatorAuditEditor
|
|||
|
||||
switch ($xaction->getTransactionType()) {
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorAuditActionConstants::ACTION:
|
||||
case PhabricatorAuditTransaction::TYPE_COMMIT:
|
||||
return;
|
||||
|
|
|
@ -111,7 +111,6 @@ final class PhabricatorCalendarEventEditor
|
|||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -153,7 +152,6 @@ final class PhabricatorCalendarEventEditor
|
|||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,6 @@ final class DifferentialTransactionEditor
|
|||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
$object->setEditPolicy($xaction->getNewValue());
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case DifferentialTransaction::TYPE_INLINE:
|
||||
return;
|
||||
|
@ -578,7 +577,6 @@ final class DifferentialTransactionEditor
|
|||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case DifferentialTransaction::TYPE_ACTION:
|
||||
return;
|
||||
|
|
|
@ -102,7 +102,6 @@ final class FundInitiativeEditor
|
|||
|
||||
$object->setTotalAsCurrency($total);
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
return;
|
||||
|
@ -155,7 +154,6 @@ final class FundInitiativeEditor
|
|||
|
||||
$editor->applyTransactions($backer, $subx);
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
return;
|
||||
|
|
|
@ -89,7 +89,6 @@ final class PhabricatorPasteEditor
|
|||
$object->setEditPolicy($xaction->getNewValue());
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -107,7 +106,6 @@ final class PhabricatorPasteEditor
|
|||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,8 +102,6 @@ final class PhabricatorProjectTransactionEditor
|
|||
case PhabricatorProjectTransaction::TYPE_LOCKED:
|
||||
$object->setIsMembershipLocked($xaction->getNewValue());
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
$object->setViewPolicy($xaction->getNewValue());
|
||||
return;
|
||||
|
@ -159,7 +157,6 @@ final class PhabricatorProjectTransactionEditor
|
|||
}
|
||||
|
||||
return;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorTransactions::TYPE_VIEW_POLICY:
|
||||
case PhabricatorTransactions::TYPE_EDIT_POLICY:
|
||||
case PhabricatorTransactions::TYPE_JOIN_POLICY:
|
||||
|
|
|
@ -401,6 +401,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
case PhabricatorTransactions::TYPE_CUSTOMFIELD:
|
||||
$field = $this->getCustomFieldForTransaction($object, $xaction);
|
||||
return $field->applyApplicationTransactionInternalEffects($xaction);
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
case PhabricatorTransactions::TYPE_INLINESTATE:
|
||||
case PhabricatorTransactions::TYPE_EDGE:
|
||||
return $this->applyBuiltinInternalTransaction($object, $xaction);
|
||||
|
@ -441,8 +442,8 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
$xaction->getOldValue(),
|
||||
$xaction->getNewValue()));
|
||||
$this->subscribers = $subscribers;
|
||||
return $this->applyBuiltinExternalTransaction($object, $xaction);
|
||||
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_EDGE:
|
||||
if ($this->getIsInverseEdgeEditor()) {
|
||||
// If we're writing an inverse edge transaction, don't actually
|
||||
|
|
Loading…
Reference in a new issue