From 095986b44974c569b36d34dd26902e910ccc7d8b Mon Sep 17 00:00:00 2001 From: Marcel Korpel Date: Mon, 17 Aug 2015 00:08:52 +0200 Subject: Do not allow empty comments Fixes FS#45870. Signed-off-by: Marcel Korpel Signed-off-by: Lukas Fleischer --- web/html/pkgbase.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web/html/pkgbase.php') diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 15818699..bc32e43c 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -107,8 +107,7 @@ if (check_token()) { list($ret, $output) = pkgbase_set_comaintainers($base_id, explode("\n", $_POST['users'])); } elseif (current_action("do_AddComment")) { $uid = uid_from_sid($_COOKIE["AURSID"]); - pkgbase_add_comment($base_id, $uid, $_REQUEST['comment']); - $ret = true; + list($ret, $output) = pkgbase_add_comment($base_id, $uid, $_REQUEST['comment']); $fragment = '#news'; } elseif (current_action("do_EditComment")) { list($ret, $output) = pkgbase_edit_comment($_REQUEST['comment']); -- cgit v1.2.3-24-g4f1b