Do not allow empty comments

Fixes FS#45870.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Marcel Korpel 2015-08-17 00:08:52 +02:00 committed by Lukas Fleischer
parent 60433a930d
commit 095986b449
2 changed files with 11 additions and 2 deletions

View file

@ -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']);