|
|
Choosing A Webhost: |
cvs: pear-core /PEAR/REST 11.php: msg#00001php.pear.core
pajoye Sat Apr 1 16:59:56 2006 UTC Modified files: /pear-core/PEAR/REST 11.php Log: - respect the old behavior, latest stable release version number is listed when the preferred_state is stable - add some air in this horrible block :) http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/REST/11.php?r1=1.4&r2=1.5&diff_format=u Index: pear-core/PEAR/REST/11.php diff -u pear-core/PEAR/REST/11.php:1.4 pear-core/PEAR/REST/11.php:1.5 --- pear-core/PEAR/REST/11.php:1.4 Fri Jan 6 04:47:37 2006 +++ pear-core/PEAR/REST/11.php Sat Apr 1 16:59:56 2006 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@xxxxxxx> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: 11.php,v 1.4 2006/01/06 04:47:37 cellog Exp $ + * @version CVS: $Id: 11.php,v 1.5 2006/04/01 16:59:56 pajoye Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.3 */ @@ -60,19 +60,24 @@ $categorylist['c'] = array($categorylist['c']); } PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($categorylist['c'] as $progress => $category) { $category = $category['_content']; $packagesinfo = $this->_rest->retrieveData($base . 'c/' . urlencode($category) . '/packagesinfo.xml'); + if (PEAR::isError($packagesinfo)) { continue; } + if (!is_array($packagesinfo) || !isset($packagesinfo['pi'])) { continue; } + if (!is_array($packagesinfo['pi']) || !isset($packagesinfo['pi'][0])) { $packagesinfo['pi'] = array($packagesinfo['pi']); } + foreach ($packagesinfo['pi'] as $packageinfo) { $info = $packageinfo['p']; $package = $info['n']; @@ -81,6 +86,7 @@ unset($unstable); unset($stable); unset($state); + if ($releases) { if (!isset($releases['r'][0])) { $releases['r'] = array($releases['r']); @@ -114,13 +120,23 @@ } } } + if ($basic) { // remote-list command if (!isset($latest)) { $latest = false; } - $ret[$package] = array('stable' => $latest); + if ($dostable) { + if ($state == 'stable') { + $ret[$package] = array('stable' => $latest); + } else { + $ret[$package] = array('stable' => '-n/a-'); + } + } else { + $ret[$package] = array('stable' => $latest); + } continue; } + // list-all command $deps = array(); if (!isset($unstable)) { @@ -132,9 +148,11 @@ } else { $latest = $unstable; } + if (!isset($latest)) { $latest = false; } + if ($latest) { if (isset($packageinfo['deps'])) { if (!is_array($packageinfo['deps']) || @@ -169,9 +187,7 @@ } } } - if (!isset($stable)) { - $stable = '-n/a-'; - } + $info = array('stable' => $latest, 'summary' => $info['s'], 'description' => $info['d'], 'deps' => $deps, 'category' => $info['ca']['_content'],
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: pearweb /public_html/feeds feeds.php, Pierre-Alain Joye |
|---|---|
| Next by Date: | cvs: pear-core /tests/PEAR_Command test_registerCommands_remoteinstall.phpt test_registerCommands_standard.phpt, Greg Beaver |
| Previous by Thread: | cvs: pearweb /public_html/feeds feeds.php, Pierre-Alain Joye |
| Next by Thread: | cvs: pear-core /tests/PEAR_Command test_registerCommands_remoteinstall.phpt test_registerCommands_standard.phpt, Greg Beaver |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |