summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-10-21 22:29:40 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-10-21 22:32:29 +0200
commit9c70e10aeb9b07981345e5af86350140753a7707 (patch)
tree2204aa3db1ec2de953a80c013ade424135b53ecf /web/lib
parent16765d553233e50b326456393108729b1f3828bf (diff)
downloadaurweb-9c70e10aeb9b07981345e5af86350140753a7707.tar.xz
Check comment length in the backend
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgbasefuncs.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index aad9d14..afccc7d 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();