Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/editor/PhabricatorConfigEditor.php
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | public static function storeNewValue( | ||||
$value, | $value, | ||||
AphrontRequest $request) { | AphrontRequest $request) { | ||||
$xaction = id(new PhabricatorConfigTransaction()) | $xaction = id(new PhabricatorConfigTransaction()) | ||||
->setTransactionType(PhabricatorConfigTransaction::TYPE_EDIT) | ->setTransactionType(PhabricatorConfigTransaction::TYPE_EDIT) | ||||
->setNewValue( | ->setNewValue( | ||||
array( | array( | ||||
'deleted' => false, | 'deleted' => false, | ||||
'value' => $value | 'value' => $value, | ||||
)); | )); | ||||
$editor = id(new PhabricatorConfigEditor()) | $editor = id(new PhabricatorConfigEditor()) | ||||
->setActor($request->getUser()) | ->setActor($request->getUser()) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setContentSourceFromRequest($request); | ->setContentSourceFromRequest($request); | ||||
$editor->applyTransactions($config_entry, array($xaction)); | $editor->applyTransactions($config_entry, array($xaction)); | ||||
} | } | ||||
} | } |