Differential D18415 Diff 44259 src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | public function getCommandSummary() { | ||||
return pht('Plan changes to a revision.'); | return pht('Plan changes to a revision.'); | ||||
} | } | ||||
public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
return $object->isChangePlanned(); | return $object->isChangePlanned(); | ||||
} | } | ||||
public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
$status_planned = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED; | $status_planned = DifferentialRevisionStatus::CHANGES_PLANNED; | ||||
$object->setStatus($status_planned); | $object->setModernRevisionStatus($status_planned); | ||||
} | } | ||||
protected function validateAction($object, PhabricatorUser $viewer) { | protected function validateAction($object, PhabricatorUser $viewer) { | ||||
if ($object->isChangePlanned()) { | if ($object->isChangePlanned()) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'You can not request review of this revision because this '. | 'You can not request review of this revision because this '. | ||||
'revision is already under review and the action would have '. | 'revision is already under review and the action would have '. | ||||
Show All 32 Lines |