cvs: pearweb /include pear-database.php /public_html get

From: Date: Sat, 29 Dec 2001 03:27:18 +0000
Subject: cvs: pearweb /include pear-database.php /public_html get
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1744@lists.php.net to get a copy of this message
cox Fri Dec 28 22:27:18 2001 EDT Modified files: /pearweb/public_html get /pearweb/include pear-database.php Log: better error handling Index: pearweb/public_html/get diff -u pearweb/public_html/get:1.6 pearweb/public_html/get:1.7 --- pearweb/public_html/get:1.6 Fri Dec 28 22:07:48 2001 +++ pearweb/public_html/get Fri Dec 28 22:27:18 2001 @@ -67,8 +67,4 @@ } } -if (!$ok) { - error_404("File Not Found"); -} - ?> Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.38 pearweb/include/pear-database.php:1.39 --- pearweb/include/pear-database.php:1.38 Fri Dec 28 15:08:05 2001 +++ pearweb/include/pear-database.php Fri Dec 28 22:27:18 2001 @@ -444,9 +444,13 @@ { global $dbh; $package_id = package::info($package, 'packageid'); - if (PEAR::isError($package_id)) { + + if (!$package_id) { + return PEAR::raiseError("release download:: package '$package' does not exist"); + } elseif (PEAR::isError($package_id)) { return $package_id; } + if ($file !== null) { $path = $dbh->getOne("SELECT fullpath FROM files ". "WHERE basename = ?", $file);

« previous php.pear.cvs (#1744) next »