Differential D18415 Diff 44259 src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
| Show All 29 Lines | public function getActionName() { | ||||
| return pht('Reopened'); | return pht('Reopened'); | ||||
| } | } | ||||
| public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
| return !$object->isClosed(); | return !$object->isClosed(); | ||||
| } | } | ||||
| public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
| $object->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW); | $status_review = DifferentialRevisionStatus::NEEDS_REVIEW; | ||||
| $object->setModernRevisionStatus($status_review); | |||||
| } | } | ||||
| protected function validateAction($object, PhabricatorUser $viewer) { | protected function validateAction($object, PhabricatorUser $viewer) { | ||||
| if (!$object->isPublished()) { | if (!$object->isPublished()) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'You can not reopen this revision because it is not closed. '. | 'You can not reopen this revision because it is not closed. '. | ||||
| 'Only closed revisions can be reopened.')); | 'Only closed revisions can be reopened.')); | ||||
| Show All 27 Lines | |||||