Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14385326
D19661.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19661.diff
View Options
diff --git a/src/applications/phriction/controller/PhrictionEditController.php b/src/applications/phriction/controller/PhrictionEditController.php
--- a/src/applications/phriction/controller/PhrictionEditController.php
+++ b/src/applications/phriction/controller/PhrictionEditController.php
@@ -72,43 +72,6 @@
}
}
- if ($request->getBool('nodraft')) {
- $draft = null;
- $draft_key = null;
- } else {
- if ($document->getPHID()) {
- $draft_key = $document->getPHID().':'.$content->getVersion();
- } else {
- $draft_key = 'phriction:'.$content->getSlug();
- }
- $draft = id(new PhabricatorDraft())->loadOneWhere(
- 'authorPHID = %s AND draftKey = %s',
- $viewer->getPHID(),
- $draft_key);
- }
-
- if ($draft &&
- strlen($draft->getDraft()) &&
- ($draft->getDraft() != $content->getContent())) {
- $content_text = $draft->getDraft();
-
- $discard = phutil_tag(
- 'a',
- array(
- 'href' => $request->getRequestURI()->alter('nodraft', true),
- ),
- pht('discard this draft'));
-
- $draft_note = new PHUIInfoView();
- $draft_note->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
- $draft_note->setTitle(pht('Recovered Draft'));
- $draft_note->appendChild(
- pht('Showing a saved draft of your edits, you can %s.', $discard));
- } else {
- $content_text = $content->getContent();
- $draft_note = null;
- }
-
require_celerity_resource('phriction-document-css');
$e_title = true;
@@ -131,6 +94,8 @@
$v_space = $document->getSpacePHID();
+ $content_text = $content->getContent();
+
if ($request->isFormPost()) {
$title = $request->getStr('title');
@@ -181,10 +146,6 @@
try {
$editor->applyTransactions($document, $xactions);
- if ($draft) {
- $draft->delete();
- }
-
$uri = PhrictionDocument::getSlugURI($document->getSlug());
return id(new AphrontRedirectResponse())->setURI($uri);
} catch (PhabricatorApplicationTransactionValidationException $ex) {
@@ -239,7 +200,6 @@
$form = id(new AphrontFormView())
->setUser($viewer)
->addHiddenInput('slug', $document->getSlug())
- ->addHiddenInput('nodraft', $request->getBool('nodraft'))
->addHiddenInput('contentVersion', $max_version)
->addHiddenInput('overwrite', $overwrite)
->appendChild(
@@ -325,7 +285,6 @@
$view = id(new PHUITwoColumnView())
->setFooter(
array(
- $draft_note,
$form_box,
$preview,
));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 11:29 AM (9 h, 29 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6918177
Default Alt Text
D19661.diff (2 KB)
Attached To
Mode
D19661: Remove obsolete, nonfunctional draft auto-saving in Phriction
Attached
Detach File
Event Timeline
Log In to Comment