From c1c7f9b35090904a4c566de026c487a0eb33da49 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 27 Aug 2013 11:31:49 +0200 Subject: Move package comment check to packages.php Checking whether to add a comment is something that really does not belong to a function named display_package_details(). Signed-off-by: Lukas Fleischer --- web/html/packages.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'web/html') diff --git a/web/html/packages.php b/web/html/packages.php index e03a099d..a9f62634 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -99,6 +99,12 @@ if (check_token()) { list($ret, $output) = pkg_change_category($pkgid, $atype); } + if (isset($_REQUEST['comment'])) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + add_package_comment($pkgid, $uid, $_REQUEST['comment']); + $ret = true; + } + if ($ret) { /* Redirect back to package page on success. */ header('Location: ' . get_pkg_uri($pkgname)); -- cgit v1.2.3-24-g4f1b