mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Correct undefined constant error in pkgsubmit.
Clean up a couple of notices. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
a16f4c77b3
commit
35cff75156
1 changed files with 6 additions and 4 deletions
|
@ -18,7 +18,7 @@ if ($_COOKIE["AURSID"]):
|
||||||
# Track upload errors
|
# Track upload errors
|
||||||
$error = "";
|
$error = "";
|
||||||
|
|
||||||
if ($_REQUEST["pkgsubmit"]) {
|
if (isset($_REQUEST['pkgsubmit'])) {
|
||||||
|
|
||||||
# Before processing, make sure we even have a file
|
# Before processing, make sure we even have a file
|
||||||
if ($_FILES['pfile']['size'] == 0){
|
if ($_FILES['pfile']['size'] == 0){
|
||||||
|
@ -205,7 +205,9 @@ if ($_COOKIE["AURSID"]):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$incoming_pkgdir = INCOMING_DIR . $pkg_name;
|
if (isset($pkg_name)) {
|
||||||
|
$incoming_pkgdir = INCOMING_DIR . $pkg_name;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
# First, see if this package already exists, and if it can be overwritten
|
# First, see if this package already exists, and if it can be overwritten
|
||||||
|
@ -243,7 +245,7 @@ if ($_COOKIE["AURSID"]):
|
||||||
}
|
}
|
||||||
|
|
||||||
# Chmod files after everything has been done.
|
# Chmod files after everything has been done.
|
||||||
if (!error && !chmod_group($incoming_pkgdir)) {
|
if (!$error && !chmod_group($incoming_pkgdir)) {
|
||||||
$error = __("Could not chmod directory %s.", $incoming_pkgdir);
|
$error = __("Could not chmod directory %s.", $incoming_pkgdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,7 +400,7 @@ html_header("Submit");
|
||||||
<div class="pgboxbody">
|
<div class="pgboxbody">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!$_REQUEST["pkgsubmit"] || $error):
|
if (empty($_REQUEST['pkgsubmit']) || $error):
|
||||||
# User is not uploading, or there were errors uploading - then
|
# User is not uploading, or there were errors uploading - then
|
||||||
# give the visitor the default upload form
|
# give the visitor the default upload form
|
||||||
if (ini_get("file_uploads")):
|
if (ini_get("file_uploads")):
|
||||||
|
|
Loading…
Add table
Reference in a new issue