summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgbasefuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-02-27 19:53:25 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-02-27 19:56:30 +0100
commit483c8f5178c6d0f093a56aecc760cefba03352d9 (patch)
treea91f555811f96fd35472aec6a77feefb3ecca30d /web/lib/pkgbasefuncs.inc.php
parentc557f348c42309fa761eaed0a7957d6b67cc0d74 (diff)
downloadaur-483c8f5178c6d0f093a56aecc760cefba03352d9.tar.gz
aur-483c8f5178c6d0f093a56aecc760cefba03352d9.tar.xz
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 <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib/pkgbasefuncs.inc.php')
-rw-r--r--web/lib/pkgbasefuncs.inc.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index 57b307d8..b20c2ffb 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -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);
}
}