Differential D17132 Diff 41201 src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | if ($this->isActionAvailable($revision, $viewer)) { | ||||
| if ($label !== null) { | if ($label !== null) { | ||||
| $field->setCommentActionLabel($label); | $field->setCommentActionLabel($label); | ||||
| $description = $this->getRevisionActionDescription(); | $description = $this->getRevisionActionDescription(); | ||||
| $field->setActionDescription($description); | $field->setActionDescription($description); | ||||
| $group_key = $this->getRevisionActionGroupKey(); | $group_key = $this->getRevisionActionGroupKey(); | ||||
| $field->setCommentActionGroupKey($group_key); | $field->setCommentActionGroupKey($group_key); | ||||
| // Currently, every revision action conflicts with every other | |||||
| // revision action: for example, you can not simultaneously Accept and | |||||
| // Reject a revision. | |||||
| // Under some configurations, some combinations of actions are sort of | |||||
| // technically permissible. For example, you could reasonably Reject | |||||
| // and Abandon a revision if "anyone can abandon anything" is enabled. | |||||
| // It's not clear that these combinations are actually useful, so just | |||||
| // keep things simple for now. | |||||
| $field->setActionConflictKey('revision.action'); | |||||
| } | } | ||||
| } | } | ||||
| return $field; | return $field; | ||||
| } | } | ||||
| public function validateTransactions($object, array $xactions) { | public function validateTransactions($object, array $xactions) { | ||||
| $errors = array(); | $errors = array(); | ||||
| Show All 21 Lines | |||||