Commit 483c8f51 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Remove bogus if-statement from pkgbase_delete()



The variable $action is always undefined in pkgbase_delete() which makes
the if-statement always true and triggers a warning whenever a package
base is removed.

Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent c557f348
......@@ -522,15 +522,13 @@ function pkgbase_delete ($base_ids, $merge_base_id, $via, $grant=false) {
}
/* Scan through pending deletion requests and close them. */
if (!$action) {
$username = username_from_sid($_COOKIE['AURSID']);
foreach ($base_ids as $base_id) {
$pkgreq_ids = array_merge(pkgreq_by_pkgbase($base_id));
foreach ($pkgreq_ids as $pkgreq_id) {
pkgreq_close(intval($pkgreq_id), 'accepted',
'The user ' . $username .
' deleted the package.', true);
}
$username = username_from_sid($_COOKIE['AURSID']);
foreach ($base_ids as $base_id) {
$pkgreq_ids = array_merge(pkgreq_by_pkgbase($base_id));
foreach ($pkgreq_ids as $pkgreq_id) {
pkgreq_close(intval($pkgreq_id), 'accepted',
'The user ' . $username .
' deleted the package.', true);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment