Differential D20675 Diff 49311 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
| Show First 20 Lines • Show All 1,795 Lines • ▼ Show 20 Lines | private function getLegacyRequiredEdgeCapabilities( | ||||
| $edge_type = $xaction->getMetadataValue('edge:type'); | $edge_type = $xaction->getMetadataValue('edge:type'); | ||||
| switch ($edge_type) { | switch ($edge_type) { | ||||
| case PhabricatorMutedByEdgeType::EDGECONST: | case PhabricatorMutedByEdgeType::EDGECONST: | ||||
| // At time of writing, you can only write this edge for yourself, so | // At time of writing, you can only write this edge for yourself, so | ||||
| // you don't need permissions. If you can eventually mute an object | // you don't need permissions. If you can eventually mute an object | ||||
| // for other users, this would need to be revisited. | // for other users, this would need to be revisited. | ||||
| return null; | return null; | ||||
| case PhabricatorProjectSilencedEdgeType::EDGECONST: | |||||
| // At time of writing, you can only write this edge for yourself, so | |||||
| // you don't need permissions. If you can eventually silence project | |||||
| // for other users, this would need to be revisited. | |||||
| return null; | |||||
| case PhabricatorObjectMentionsObjectEdgeType::EDGECONST: | case PhabricatorObjectMentionsObjectEdgeType::EDGECONST: | ||||
| return null; | return null; | ||||
| case PhabricatorProjectProjectHasMemberEdgeType::EDGECONST: | case PhabricatorProjectProjectHasMemberEdgeType::EDGECONST: | ||||
| $old = $xaction->getOldValue(); | $old = $xaction->getOldValue(); | ||||
| $new = $xaction->getNewValue(); | $new = $xaction->getNewValue(); | ||||
| $add = array_keys(array_diff_key($new, $old)); | $add = array_keys(array_diff_key($new, $old)); | ||||
| $rem = array_keys(array_diff_key($old, $new)); | $rem = array_keys(array_diff_key($old, $new)); | ||||
| ▲ Show 20 Lines • Show All 3,570 Lines • Show Last 20 Lines | |||||