summaryrefslogtreecommitdiffstats
path: root/web/html/pkgbase.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/html/pkgbase.php')
-rw-r--r--web/html/pkgbase.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index 0d1b74a..0b0f6ef 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -59,23 +59,25 @@ if (check_token()) {
} elseif (current_action("do_UnFlag")) {
list($ret, $output) = pkgbase_unflag($atype, $ids);
} elseif (current_action("do_Adopt")) {
- list($ret, $output) = pkgbase_adopt($atype, $ids, true);
+ list($ret, $output) = pkgbase_adopt($atype, $ids, true, NULL);
} elseif (current_action("do_Disown")) {
- list($ret, $output) = pkgbase_adopt($atype, $ids, false);
+ $via = isset($_POST['via']) ? $_POST['via'] : NULL;
+ list($ret, $output) = pkgbase_adopt($atype, $ids, false, $via);
} elseif (current_action("do_Vote")) {
list($ret, $output) = pkgbase_vote($atype, $ids, true);
} elseif (current_action("do_UnVote")) {
list($ret, $output) = pkgbase_vote($atype, $ids, false);
} elseif (current_action("do_Delete")) {
if (isset($_POST['confirm_Delete'])) {
+ $via = isset($_POST['via']) ? $_POST['via'] : NULL;
if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) {
- list($ret, $output) = pkgbase_delete($atype, $ids, NULL);
+ list($ret, $output) = pkgbase_delete($atype, $ids, NULL, $via);
unset($_GET['ID']);
}
else {
$merge_base_id = pkgbase_from_name($_POST['merge_Into']);
if ($merge_base_id) {
- list($ret, $output) = pkgbase_delete($atype, $ids, $merge_base_id);
+ list($ret, $output) = pkgbase_delete($atype, $ids, $merge_base_id, $via);
unset($_GET['ID']);
}
else {
@@ -94,6 +96,10 @@ if (check_token()) {
list($ret, $output) = pkgbase_delete_comment($atype);
} elseif (current_action("do_ChangeCategory")) {
list($ret, $output) = pkgbase_change_category($base_id, $atype);
+ } elseif (current_action("do_FileRequest")) {
+ list($ret, $output) = pkgbase_file_request($ids, $_POST['type'], $_POST['merge_into'], $_POST['comments']);
+ } elseif (current_action("do_CloseRequest")) {
+ list($ret, $output) = pkgbase_close_request($_POST['reqid']);
}
if (isset($_REQUEST['comment'])) {
@@ -103,7 +109,11 @@ if (check_token()) {
}
if ($ret) {
- if (isset($base_id)) {
+ if (current_action("do_CloseRequest")) {
+ /* Redirect back to package request page on success. */
+ header('Location: ' . get_pkgreq_route());
+ exit();
+ } if (isset($base_id)) {
/* Redirect back to package base page on success. */
header('Location: ' . get_pkgbase_uri($pkgbase_name));
exit();