issue: populate ticket data before reply include
[minimedit.git] / widget / reply.php
index 43b773bead82752eef7f727a9afb5708b7645430..fd01a947f81acb6748fb300b2bac7f00788216ef 100644 (file)
@@ -7,12 +7,11 @@ $journalcol = [
 ];
 
 if ($_POST) {
+       require_once 'upload.inc.php';
        try {
-               $html = nl2br(htmlspecialchars($_POST['reply']));
-               $html = empty($html) ? NULL : "<p>$html</p>";
                $query = $Db->set('comments', [
                        'page'    => $Page,
-                       'message' => $html,
+                       'message' => messagehtml($_POST['reply']),
                        'author'  => $User->login,
                ]);
                if (!$query->rowCount()) {
@@ -47,6 +46,7 @@ if ($_POST) {
                                                'value'      => $updated->$col,
                                        ]);
                                }
+                               $Issue = $updated;
                        }
                }
                $_POST['reply'] = NULL;