From 46ab79b3efa7e6a8fae50580a5fa6b938dfca18c Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 5 Aug 2015 10:10:28 -0500
Subject: [PATCH] draft: Prefer POST submission over saved draft

---
 include/staff/ticket-view.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index 429d6794b..c43bec60f 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -581,7 +581,7 @@ $tcount = $ticket->getThreadEntries($types)->count();
                         class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext';
                             ?> draft draft-delete" <?php
     list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.response', $ticket->getId(), $info['response']);
-    echo $attrs; ?>><?php echo $draft ?: $info['response'];
+    echo $attrs; ?>><?php echo $_POST ? $info['response'] : $draft;
                     ?></textarea>
                 <div id="reply_form_attachments" class="attachments">
                 <?php
@@ -698,7 +698,7 @@ $tcount = $ticket->getThreadEntries($types)->count();
                         class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext';
                             ?> draft draft-delete" <?php
     list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.note', $ticket->getId(), $info['note']);
-    echo $attrs; ?>><?php echo $draft ?: $info['note'];
+    echo $attrs; ?>><?php echo $_POST ? $info['note'] : $draft;
                         ?></textarea>
                 <div class="attachments">
                 <?php
-- 
GitLab