Page MenuHomePhabricator

D19862.id47427.diff
No OneTemporary

D19862.id47427.diff

diff --git a/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php b/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
--- a/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
+++ b/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
@@ -41,12 +41,19 @@
}
$xactions = array();
- $xactions[] = id(new PhrictionTransaction())
- ->setTransactionType(PhrictionDocumentTitleTransaction::TRANSACTIONTYPE)
- ->setNewValue($request->getValue('title'));
- $xactions[] = id(new PhrictionTransaction())
- ->setTransactionType(PhrictionDocumentContentTransaction::TRANSACTIONTYPE)
- ->setNewValue($request->getValue('content'));
+ if ($request->getValue('title')) {
+ $xactions[] = id(new PhrictionTransaction())
+ ->setTransactionType(
+ PhrictionDocumentTitleTransaction::TRANSACTIONTYPE)
+ ->setNewValue($request->getValue('title'));
+ }
+
+ if ($request->getValue('content')) {
+ $xactions[] = id(new PhrictionTransaction())
+ ->setTransactionType(
+ PhrictionDocumentContentTransaction::TRANSACTIONTYPE)
+ ->setNewValue($request->getValue('content'));
+ }
$editor = id(new PhrictionTransactionEditor())
->setActor($request->getUser())

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 7, 6:47 AM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7324854
Default Alt Text
D19862.id47427.diff (1 KB)

Event Timeline