[aur-dev] [PATCH 1/3] Remove bogus if-statement from pkgbase_delete()
Lukas Fleischer
lfleischer at archlinux.org
Mon Feb 27 19:13:33 UTC 2017
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 at archlinux.org>
---
web/lib/pkgbasefuncs.inc.php | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index 57b307d..b20c2ff 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);
}
}
--
2.12.0
More information about the aur-dev
mailing list