From 396e50bdc88feae9d0048d1c3dab776388d96dc7 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 31 Aug 2015 18:29:06 +0200 Subject: Require comments when flagging packages out-of-date Implements FS#42827. Signed-off-by: Lukas Fleischer --- web/html/pkgbase.php | 7 ++++++- web/html/pkgflag.php | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'web/html') diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index bc32e43..a241c74 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -49,7 +49,12 @@ $output = ""; $fragment = ""; if (check_token()) { if (current_action("do_Flag")) { - list($ret, $output) = pkgbase_flag($ids); + if (strlen($_POST['comments']) >= 3) { + list($ret, $output) = pkgbase_flag($ids, $_POST['comments']); + } else { + $output = __("The selected packages have not been flagged, please enter a comment."); + $ret = false; + } } elseif (current_action("do_UnFlag")) { list($ret, $output) = pkgbase_unflag($ids); } elseif (current_action("do_Adopt")) { diff --git a/web/html/pkgflag.php b/web/html/pkgflag.php index 9d86909..bfe89e0 100644 --- a/web/html/pkgflag.php +++ b/web/html/pkgflag.php @@ -25,12 +25,17 @@ if (has_credential(CRED_PKGBASE_FLAG)): ?>

', ''); ?> +

+

+ + +

" />

-- cgit v1.2.3-70-g09d2