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