reply: omit empty messages like issue page
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 8 Nov 2019 01:29:05 +0000 (02:29 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 25 Nov 2019 20:14:17 +0000 (21:14 +0100)
Copy recent update in formatting.

widget/reply.php

index 53fe34fb32ec31c3e2c5698a72bd798979be35cd..43b773bead82752eef7f727a9afb5708b7645430 100644 (file)
@@ -9,7 +9,7 @@ $journalcol = [
 if ($_POST) {
        try {
                $html = nl2br(htmlspecialchars($_POST['reply']));
-               $html = "<p>$html</p>";
+               $html = empty($html) ? NULL : "<p>$html</p>";
                $query = $Db->set('comments', [
                        'page'    => $Page,
                        'message' => $html,