cvs: pearweb /include pear-database.php

From: Date: Tue, 26 Oct 2004 20:33:52 +0000
Subject: cvs: pearweb /include pear-database.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-25263@lists.php.net to get a copy of this message
dufuz Tue Oct 26 16:33:52 2004 EDT Modified files: /pearweb/include pear-database.php Log: - For the bug system: Ability to get only pecl packages. extra param added to packages::listAll added for that. - Added comment to whoIsWho to clarify the types in there a little. http://cvs.php.net/diff.php/pearweb/include/pear-database.php?r1=1.249&r2=1.250&ty=u Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.249 pearweb/include/pear-database.php:1.250 --- pearweb/include/pear-database.php:1.249 Thu Oct 14 21:33:05 2004 +++ pearweb/include/pear-database.php Tue Oct 26 16:33:50 2004 @@ -17,7 +17,7 @@ | Tomas V.V.Cox <cox@php.net> | | Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ - $Id: pear-database.php,v 1.249 2004/10/15 01:33:05 cellog Exp $ + $Id: pear-database.php,v 1.250 2004/10/26 20:33:50 dufuz Exp $ */ require_once 'DB/storage.php'; @@ -790,20 +790,26 @@ * @static * @param boolean Only list released packages? * @param boolean If listing released packages only, only list stable releases? + * @param boolean List also PECL packages + * @param boolean Only list PECL packages * @return array */ - function listAll($released_only = true, $stable_only = true, $include_pecl=false) + function listAll($released_only = true, $stable_only = true, $include_pecl = false, $only_pecl = false) { global $dbh, $HTTP_RAW_POST_DATA; if (isset($HTTP_RAW_POST_DATA)) { $include_pecl = true; } - if ($include_pecl) { - $package_type = ""; - } else { + + $package_type = ''; + if (!$include_pecl && !$only_pecl) { $package_type = "p.package_type = 'pear' AND p.approved = 1 AND "; } + + if ($only_pecl) { + $package_type = "p.package_type = 'pecl' AND p.approved = 1 AND "; + } $packageinfo = $dbh->getAssoc("SELECT p.name, p.id AS packageid, ". "c.id AS categoryid, c.name AS category, ". @@ -2587,6 +2593,7 @@ $users[$id]['type'] = 0; } + // Returned 'type' is 1 for PEAR, 2 for PECL or 3 for both switch ($users[$id]['type']) { case '3': break;

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