Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
Show All 39 Lines | if (!$doc) { | ||||
throw new Exception(pht('No such document.')); | throw new Exception(pht('No such document.')); | ||||
} | } | ||||
$xactions = array(); | $xactions = array(); | ||||
$xactions[] = id(new PhrictionTransaction()) | $xactions[] = id(new PhrictionTransaction()) | ||||
->setTransactionType(PhrictionDocumentTitleTransaction::TRANSACTIONTYPE) | ->setTransactionType(PhrictionDocumentTitleTransaction::TRANSACTIONTYPE) | ||||
->setNewValue($request->getValue('title')); | ->setNewValue($request->getValue('title')); | ||||
$xactions[] = id(new PhrictionTransaction()) | $xactions[] = id(new PhrictionTransaction()) | ||||
->setTransactionType(PhrictionTransaction::TYPE_CONTENT) | ->setTransactionType(PhrictionDocumentContentTransaction::TRANSACTIONTYPE) | ||||
->setNewValue($request->getValue('content')); | ->setNewValue($request->getValue('content')); | ||||
$editor = id(new PhrictionTransactionEditor()) | $editor = id(new PhrictionTransactionEditor()) | ||||
->setActor($request->getUser()) | ->setActor($request->getUser()) | ||||
->setContentSource($request->newContentSource()) | ->setContentSource($request->newContentSource()) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setDescription($request->getValue('description')); | ->setDescription($request->getValue('description')); | ||||
Show All 11 Lines |