summaryrefslogtreecommitdiffstats
path: root/web/html/packages.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-04 23:10:38 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 12:21:36 +0200
commitb558572a2ee6c1022eb1e663840f11a5745459a9 (patch)
tree82a1a181e5d08de1648246c69e972c4747eb8ce7 /web/html/packages.php
parent45bd1b34f120909c48bc8fefa3dce1be28aeed0f (diff)
downloadaurweb-b558572a2ee6c1022eb1e663840f11a5745459a9.tar.xz
Make the delete function remove package bases
Deleting a single package without deleting the whole package base makes no sense. Comments and votes are already stored on a per-package basis, making this a straightforward extension. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/packages.php')
-rw-r--r--web/html/packages.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/html/packages.php b/web/html/packages.php
index f5ecf94..d9c3a86 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -72,13 +72,13 @@ if (check_token()) {
} elseif (current_action("do_Delete")) {
if (isset($_POST['confirm_Delete'])) {
if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) {
- list($ret, $output) = pkg_delete($atype, $ids, NULL);
+ list($ret, $output) = pkg_delete($atype, pkgbase_from_pkgid($ids), NULL);
unset($_GET['ID']);
}
else {
- $mergepkgid = pkgid_from_name($_POST['merge_Into']);
- if ($mergepkgid) {
- list($ret, $output) = pkg_delete($atype, $ids, $mergepkgid);
+ $merge_base_id = pkgbase_from_name($_POST['merge_Into']);
+ if ($merge_base_id) {
+ list($ret, $output) = pkg_delete($atype, pkgbase_from_pkgid($ids), $merge_base_id);
unset($_GET['ID']);
}
else {