Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/PhabricatorInlineCommentController.php
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | switch ($op) { | ||||
$inline->setIsEditing(false); | $inline->setIsEditing(false); | ||||
// If the user uses "Undo" to get into an edited state ("AB"), then | // If the user uses "Undo" to get into an edited state ("AB"), then | ||||
// clicks cancel to return to the previous state ("A"), we also want | // clicks cancel to return to the previous state ("A"), we also want | ||||
// to set the stored state back to "A". | // to set the stored state back to "A". | ||||
$this->updateCommentContentState($inline); | $this->updateCommentContentState($inline); | ||||
if ($inline->isVoidComment($viewer)) { | |||||
$inline->setIsDeleted(1); | |||||
} | |||||
$this->saveComment($inline); | $this->saveComment($inline); | ||||
return $this->buildEmptyResponse(); | return $this->buildEmptyResponse(); | ||||
case 'draft': | case 'draft': | ||||
$inline = $this->loadCommentByIDForEdit($this->getCommentID()); | $inline = $this->loadCommentByIDForEdit($this->getCommentID()); | ||||
$versioned_draft = PhabricatorVersionedDraft::loadOrCreateDraft( | $versioned_draft = PhabricatorVersionedDraft::loadOrCreateDraft( | ||||
$inline->getPHID(), | $inline->getPHID(), | ||||
▲ Show 20 Lines • Show All 326 Lines • Show Last 20 Lines |