diff options
author | Loui Chang <louipc.ist@gmail.com> | 2008-12-28 15:33:36 +0100 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2008-12-29 23:44:57 +0100 |
commit | 35cff75156ddd77aad2f97bf756008486b630863 (patch) | |
tree | a11121a479324f942fad52d619e69981ff0b2545 /web | |
parent | a16f4c77b32e148466f78560564871ace3a87506 (diff) | |
download | aur-35cff75156ddd77aad2f97bf756008486b630863.tar.gz aur-35cff75156ddd77aad2f97bf756008486b630863.tar.xz |
Correct undefined constant error in pkgsubmit.
Clean up a couple of notices.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r-- | web/html/pkgsubmit.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 257e3b59..a7b4152b 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -18,7 +18,7 @@ if ($_COOKIE["AURSID"]): # Track upload errors $error = ""; - if ($_REQUEST["pkgsubmit"]) { + if (isset($_REQUEST['pkgsubmit'])) { # Before processing, make sure we even have a file 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) { # 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. - if (!error && !chmod_group($incoming_pkgdir)) { + if (!$error && !chmod_group($incoming_pkgdir)) { $error = __("Could not chmod directory %s.", $incoming_pkgdir); } @@ -398,7 +400,7 @@ html_header("Submit"); <div class="pgboxbody"> <?php - if (!$_REQUEST["pkgsubmit"] || $error): + if (empty($_REQUEST['pkgsubmit']) || $error): # User is not uploading, or there were errors uploading - then # give the visitor the default upload form if (ini_get("file_uploads")): |