mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
45bd1b34f1
commit
b558572a2e
2 changed files with 58 additions and 32 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue