From 0ac8970b62ad728bc0988e7e0a7f16efe78ea6cd Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 31 Jul 2011 19:04:59 +0200 Subject: Rename package_exists() to pkgid_from_name() Describe what this function actually does: Return the ID of a package with a given name and return NULL if such a package doesn't exist. The function name is chosen in a fashion similar to other functions from "pkgfuncs.inc.php" (pkgname_from_id(), pkgnotify_from_sid(), ...). Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/html') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index d21e6ae..f7f0dd4 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -261,7 +261,7 @@ if ($uid): if (!$error) { # First, see if this package already exists, and if it can be overwritten - $pkg_exists = package_exists($pkg_name); + $pkg_id = pkgid_from_name($pkg_name); if (can_submit_pkg($pkg_name, $_COOKIE["AURSID"])) { if (file_exists($incoming_pkgdir)) { # Blow away the existing file/dir and contents @@ -278,7 +278,7 @@ if ($uid): if (!$error) { # Check if package name is blacklisted. - if (!$pkg_exists && pkgname_is_blacklisted($pkg_name)) { + if (!$pkg_id && pkgname_is_blacklisted($pkg_name)) { if (!canSubmitBlacklisted(account_from_sid($_COOKIE["AURSID"]))) { $error = __( "%s is on the package blacklist, please check if it's available in the official repos.", $pkg_name); } -- cgit v1.2.3-70-g09d2