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 --- scripts/cleanup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cleanup b/scripts/cleanup index d3ba3f9..7999429 100755 --- a/scripts/cleanup +++ b/scripts/cleanup @@ -34,7 +34,7 @@ foreach ($buckets as $bucket) { continue; } $fullpath = INCOMING_DIR . $bucket . "/" . $pkgname; - if (!package_exists($pkgname) && is_dir($fullpath)) { + if (!pkgid_from_name($pkgname) && is_dir($fullpath)) { echo 'Removing ' . $fullpath . "\n"; rm_tree($fullpath); $count++; -- cgit v1.2.3-70-g09d2