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>
This commit is contained in:
Lukas Fleischer 2013-08-27 11:31:49 +02:00
parent bf019a5b6c
commit c1c7f9b350
2 changed files with 6 additions and 4 deletions

View file

@ -449,10 +449,6 @@ function display_package_details($id=0, $row, $SID="") {
# Actions Bar
if ($SID) {
include('actions_form.php');
if (isset($_REQUEST['comment']) && check_token()) {
$uid = uid_from_sid($SID);
add_package_comment($id, $uid, $_REQUEST['comment']);
}
include('pkg_comment_form.php');
}