Differential D17986 Diff 43259 src/applications/project/controller/PhabricatorProjectLockController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/controller/PhabricatorProjectLockController.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
if ($is_locked) { | if ($is_locked) { | ||||
$new_value = 0; | $new_value = 0; | ||||
} else { | } else { | ||||
$new_value = 1; | $new_value = 1; | ||||
} | } | ||||
$xactions[] = id(new PhabricatorProjectTransaction()) | $xactions[] = id(new PhabricatorProjectTransaction()) | ||||
->setTransactionType(PhabricatorProjectTransaction::TYPE_LOCKED) | ->setTransactionType( | ||||
PhabricatorProjectLockTransaction::TRANSACTIONTYPE) | |||||
->setNewValue($new_value); | ->setNewValue($new_value); | ||||
$editor = id(new PhabricatorProjectTransactionEditor()) | $editor = id(new PhabricatorProjectTransactionEditor()) | ||||
->setActor($viewer) | ->setActor($viewer) | ||||
->setContentSourceFromRequest($request) | ->setContentSourceFromRequest($request) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setContinueOnMissingFields(true) | ->setContinueOnMissingFields(true) | ||||
->applyTransactions($project, $xactions); | ->applyTransactions($project, $xactions); | ||||
Show All 25 Lines |