Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/editor/PhrictionTransactionEditor.php
Show First 20 Lines • Show All 550 Lines • ▼ Show 20 Lines | private function newDocumentContent(PhrictionDocument $document) { | ||||
$content = id(new PhrictionContent()) | $content = id(new PhrictionContent()) | ||||
->setSlug($document->getSlug()) | ->setSlug($document->getSlug()) | ||||
->setAuthorPHID($this->getActingAsPHID()) | ->setAuthorPHID($this->getActingAsPHID()) | ||||
->setChangeType(PhrictionChangeType::CHANGE_EDIT) | ->setChangeType(PhrictionChangeType::CHANGE_EDIT) | ||||
->setTitle($this->getOldContent()->getTitle()) | ->setTitle($this->getOldContent()->getTitle()) | ||||
->setContent($this->getOldContent()->getContent()) | ->setContent($this->getOldContent()->getContent()) | ||||
->setDescription(''); | ->setDescription(''); | ||||
if (strlen($this->getDescription())) { | if (phutil_nonempty_string($this->getDescription())) { | ||||
$content->setDescription($this->getDescription()); | $content->setDescription($this->getDescription()); | ||||
} | } | ||||
$content->setVersion($document->getMaxVersion() + 1); | $content->setVersion($document->getMaxVersion() + 1); | ||||
return $content; | return $content; | ||||
} | } | ||||
Show All 12 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0