summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgbasefuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-05-21 17:08:58 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-05-21 17:10:33 +0200
commit01bfae82ce90e5f98180fb920479ed72977c0385 (patch)
treed82ad3d3e6ecf06b59212c32e00841e442e2965b /web/lib/pkgbasefuncs.inc.php
parentc3614c4f097f1a37485672b04759c5c163f1cf42 (diff)
downloadaurweb-01bfae82ce90e5f98180fb920479ed72977c0385.tar.xz
Make the type parameter of pkgreq_by_pkgbase() optional
This simplifies the code a bit, improves maintainability and reduces the number of SQL queries when deleting a package. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib/pkgbasefuncs.inc.php')
-rw-r--r--web/lib/pkgbasefuncs.inc.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index 3f02bc7..3e4b572 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -513,10 +513,7 @@ function pkgbase_delete ($base_ids, $merge_base_id, $via, $grant=false) {
if (!$action) {
$username = username_from_sid($_COOKIE['AURSID']);
foreach ($base_ids as $base_id) {
- $pkgreq_ids = array_merge(
- pkgreq_by_pkgbase($base_id, 'deletion'),
- pkgreq_by_pkgbase($base_id, 'merge'),
- pkgreq_by_pkgbase($base_id, 'orphan'));
+ $pkgreq_ids = array_merge(pkgreq_by_pkgbase($base_id));
foreach ($pkgreq_ids as $pkgreq_id) {
pkgreq_close(intval($pkgreq_id), 'accepted',
'The user ' . $username .