cvs: pearweb /include pear-database.php
| From: | Martin Jansen | Date: | Thu, 16 Oct 2003 11:53:54 +0000 |
| Subject: | cvs: pearweb /include pear-database.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13657@lists.php.net to get a copy of this message | ||
mj Thu Oct 16 07:53:54 2003 EDT
Modified files:
/pearweb/include pear-database.php
Log:
* Cleanup
Index: pearweb/include/pear-database.php
diff -u pearweb/include/pear-database.php:1.149 pearweb/include/pear-database.php:1.150
--- pearweb/include/pear-database.php:1.149 Thu Oct 16 06:57:21 2003
+++ pearweb/include/pear-database.php Thu Oct 16 07:53:54 2003
@@ -17,7 +17,7 @@
| Tomas V.V.Cox <cox@php.net> |
| Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: pear-database.php,v 1.149 2003/10/16 10:57:21 pajoye Exp $
+ $Id: pear-database.php,v 1.150 2003/10/16 11:53:54 mj Exp $
*/
require_once 'DB/storage.php';
@@ -381,11 +381,12 @@
* Get package information
*
* @static
- * @param mixed Name of the package or it's ID
- * @param string Single field to fetch
+ * @param mixed Name of the package or it's ID
+ * @param string Single field to fetch
+ * @param boolean Should PECL packages also be taken into account?
* @return mixed
*/
- function info($pkg, $field = null, $allow_pecl=false)
+ function info($pkg, $field = null, $allow_pecl = false)
{
global $dbh;
@@ -396,7 +397,7 @@
}
if ($allow_pecl) {
- $package_type = '';
+ $package_type = "";
} else {
$package_typ = "p.package_type = 'pear' AND ";
}
@@ -408,7 +409,7 @@
"p.description AS description, p.cvs_link AS cvs_link, ".
"p.doc_link as doc_link".
" FROM packages p, categories c ".
- "WHERE ".$package_type." p.approved = 1 AND c.id = p.category AND
p.{$what} = ?";
+ "WHERE " . $package_type . " p.approved = 1 AND c.id = p.category AND
p.{$what} = ?";
$rel_sql = "SELECT version, id, doneby, license, summary, ".
"description, releasedate, releasenotes, state ".
"FROM releases ".