Page MenuHomePhabricator

D13183.diff
No OneTemporary

D13183.diff

diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -1554,10 +1554,6 @@
PhabricatorLiskDAO $object,
array $xactions) {
- $unsubscribed_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
- $object->getPHID(),
- PhabricatorObjectHasUnsubscriberEdgeType::EDGECONST);
-
$revision = id(new DifferentialRevisionQuery())
->setViewer($this->getActor())
->withPHIDs(array($object->getPHID()))
@@ -1577,7 +1573,6 @@
$reviewer_phids = mpull($reviewers, 'getReviewerPHID');
$adapter->setExplicitReviewers($reviewer_phids);
- $adapter->setForbiddenCCs($unsubscribed_phids);
return $adapter;
}
@@ -1589,24 +1584,6 @@
$xactions = array();
- // Build a transaction to adjust CCs.
- $ccs = array(
- '+' => array_keys($adapter->getCCsAddedByHerald()),
- '-' => array_keys($adapter->getCCsRemovedByHerald()),
- );
- $value = array();
- foreach ($ccs as $type => $phids) {
- foreach ($phids as $phid) {
- $value[$type][$phid] = $phid;
- }
- }
-
- if ($value) {
- $xactions[] = id(new DifferentialTransaction())
- ->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS)
- ->setNewValue($value);
- }
-
// Build a transaction to adjust reviewers.
$reviewers = array(
DifferentialReviewerStatus::STATUS_ADDED =>
diff --git a/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php b/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
--- a/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
+++ b/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
@@ -6,10 +6,6 @@
protected $revision;
protected $explicitReviewers;
- protected $forbiddenCCs;
-
- protected $newCCs = array();
- protected $remCCs = array();
protected $addReviewerPHIDs = array();
protected $blockingReviewerPHIDs = array();
protected $buildPlans = array();
@@ -114,19 +110,6 @@
return $this;
}
- public function setForbiddenCCs($forbidden_ccs) {
- $this->forbiddenCCs = $forbidden_ccs;
- return $this;
- }
-
- public function getCCsAddedByHerald() {
- return array_diff_key($this->newCCs, $this->remCCs);
- }
-
- public function getCCsRemovedByHerald() {
- return $this->remCCs;
- }
-
public function getReviewersAddedByHerald() {
return $this->addReviewerPHIDs;
}
@@ -286,57 +269,9 @@
$result = array();
- $forbidden_ccs = array_fill_keys(
- nonempty($this->forbiddenCCs, array()),
- true);
-
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_ADD_CC:
- $base_target = $effect->getTarget();
- $forbidden = array();
- foreach ($base_target as $key => $fbid) {
- if (isset($forbidden_ccs[$fbid])) {
- $forbidden[] = $fbid;
- unset($base_target[$key]);
- } else {
- $this->newCCs[$fbid] = true;
- }
- }
-
- if ($forbidden) {
- $failed = clone $effect;
- $failed->setTarget($forbidden);
- if ($base_target) {
- $effect->setTarget($base_target);
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht(
- 'Added these addresses to CC list. '.
- 'Others could not be added.'));
- }
- $result[] = new HeraldApplyTranscript(
- $failed,
- false,
- pht('CC forbidden, these addresses have unsubscribed.'));
- } else {
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Added addresses to CC list.'));
- }
- break;
- case self::ACTION_REMOVE_CC:
- foreach ($effect->getTarget() as $fbid) {
- $this->remCCs[$fbid] = true;
- }
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Removed addresses from CC list.'));
- break;
case self::ACTION_ADD_REVIEWERS:
foreach ($effect->getTarget() as $phid) {
$this->addReviewerPHIDs[$phid] = true;

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 4:14 AM (18 h, 10 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6909493
Default Alt Text
D13183.diff (4 KB)

Event Timeline