summaryrefslogtreecommitdiffstats
path: root/web/html/packages.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2013-08-27 11:31:49 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2013-08-27 11:35:26 +0200
commitc1c7f9b35090904a4c566de026c487a0eb33da49 (patch)
tree1e340a7d866495ccf34a81f9a1908b2c9bdad512 /web/html/packages.php
parentbf019a5b6c66ab8a53382a739f1adf7dd568db23 (diff)
downloadaur-c1c7f9b35090904a4c566de026c487a0eb33da49.tar.gz
aur-c1c7f9b35090904a4c566de026c487a0eb33da49.tar.xz
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 <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/packages.php')
-rw-r--r--web/html/packages.php6
1 files changed, 6 insertions, 0 deletions
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));