summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-02-28 19:29:36 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-02-28 19:29:36 +0100
commit1af5ba64e748de0f8a94e7f5f023315d2ff0302c (patch)
treedca582dbf39e4684ea530e84b4a3b92428149645 /web/html
parentcc84e0b7fd7d491e1ba987786c45ddaf5bcd58d4 (diff)
downloadaur-1af5ba64e748de0f8a94e7f5f023315d2ff0302c.tar.gz
aur-1af5ba64e748de0f8a94e7f5f023315d2ff0302c.tar.xz
pkgbase.php: Fix PHP notice
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/pkgbase.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index ab409845..a593af10 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -44,6 +44,7 @@ if (isset($_POST['IDs'])) {
}
/* Perform package base actions. */
+$via = isset($_POST['via']) ? $_POST['via'] : NULL;
$ret = false;
$output = "";
$fragment = "";
@@ -56,7 +57,6 @@ if (check_token()) {
list($ret, $output) = pkgbase_adopt($ids, true, NULL);
} elseif (current_action("do_Disown")) {
if (isset($_POST['confirm'])) {
- $via = isset($_POST['via']) ? $_POST['via'] : NULL;
list($ret, $output) = pkgbase_adopt($ids, false, $via);
} else {
$output = __("The selected packages have not been disowned, check the confirmation checkbox.");
@@ -68,7 +68,6 @@ if (check_token()) {
list($ret, $output) = pkgbase_vote($ids, false);
} elseif (current_action("do_Delete")) {
if (isset($_POST['confirm'])) {
- $via = isset($_POST['via']) ? $_POST['via'] : NULL;
if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) {
list($ret, $output) = pkgbase_delete($ids, NULL, $via);
unset($_GET['ID']);
@@ -129,7 +128,7 @@ if (check_token()) {
if ($ret) {
if (current_action("do_CloseRequest") ||
- (current_action("do_Delete") && $_POST['via'])) {
+ (current_action("do_Delete") && $via)) {
/* Redirect back to package request page on success. */
header('Location: ' . get_pkgreq_route());
exit();