From 9c70e10aeb9b07981345e5af86350140753a7707 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 21 Oct 2015 22:29:40 +0200 Subject: Check comment length in the backend Signed-off-by: Lukas Fleischer --- web/lib/pkgbasefuncs.inc.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/lib') diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index aad9d14d..afccc7de 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -330,6 +330,10 @@ function pkgbase_flag($base_ids, $comment) { return array(false, __("You did not select any packages to flag.")); } + if (strlen($comment) < 3) { + return array(false, __("The selected packages have not been flagged, please enter a comment.")); + } + $uid = uid_from_sid($_COOKIE['AURSID']); $dbh = DB::connect(); -- cgit v1.2.3-24-g4f1b