From b558572a2ee6c1022eb1e663840f11a5745459a9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 4 Apr 2014 23:10:38 +0200 Subject: 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 --- web/html/packages.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/html/packages.php') diff --git a/web/html/packages.php b/web/html/packages.php index f5ecf946..d9c3a860 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 { -- cgit v1.2.3-24-g4f1b