Update of /cvsroot/fink/php-lib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv21697
Modified Files: finkinfo.inc get_distributions.php releases.inc Log Message: also get releases Index: finkinfo.inc =================================================================== RCS file: /cvsroot/fink/php-lib/finkinfo.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- finkinfo.inc 17 Nov 2007 03:44:15 -0000 1.5 +++ finkinfo.inc 26 Nov 2007 20:29:58 -0000 1.6 @@ -140,6 +140,12 @@ return $id; } + public function getDistribution() { return $this->distribution; } + public function setDistribution($dist) { $this->distribution = $dist; } + public function getType() { return $this->type; } + public function setType($type) { $this->type = $type; } + public function getVersion() { return $this->version; } + public function setVersion($version) { $this->version = $version; } public function getPriority() { return $this->priority; } public function setPriority($prio) { $this->priority = $prio; } public function isActive() { return $this->isActive; } Index: get_distributions.php =================================================================== RCS file: /cvsroot/fink/php-lib/get_distributions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- get_distributions.php 17 Nov 2007 03:44:15 -0000 1.1 +++ get_distributions.php 26 Nov 2007 20:29:58 -0000 1.2 @@ -3,11 +3,26 @@ include "releases.inc"; +$print_releases = 0; + +if ($argv[1] == "-r") { + $print_releases = 1; +} + $stdout = fopen('php://output', 'w'); -foreach ($distributions as $key => $value) { - $distinfo = array($key, $value->getName(), $value->getArchitecture(), $value->getDescription(), $value->getRcsPath(), $value->getPriority(), $value->isActive(), $value->isVisible(), $value->isSupported()); - fputcsv($stdout, $distinfo); +if (!$print_releases) { + fputcsv($stdout, array('id', 'name', 'architecture', 'description', 'rcspath', 'priority', 'isactive', 'isvisible', 'issupported')); + foreach ($distributions as $key => $value) { + $distinfo = array($value->getId(), $value->getName(), $value->getArchitecture(), $value->getDescription(), $value->getRcsPath(), $value->getPriority(), $value->isActive(), $value->isVisible(), $value->isSupported()); + fputcsv($stdout, $distinfo); + } +} else { + fputcsv($stdout, array('id', 'distribution_id', 'type', 'version', 'priority', 'isactive')); + foreach ($releases as $key => $value) { + $distinfo = array($value->getId(), $value->getDistribution()->getId(), $value->getType(), $value->getVersion(), $value->getPriority(), $value->isActive()); + fputcsv($stdout, $distinfo); + } } fclose($stdout); Index: releases.inc =================================================================== RCS file: /cvsroot/fink/php-lib/releases.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- releases.inc 17 Nov 2007 03:44:15 -0000 1.2 +++ releases.inc 26 Nov 2007 20:29:58 -0000 1.3 @@ -13,7 +13,7 @@ ); $releases = array( - "10.1-bindist" => new Release($distributions["10.1"], "bindist", "0.4.1", 1, false), + "10.1-bindist" => new Release($distributions["10.1"], "bindist", "0.4.1a", 1, false), "10.2-bindist" => new Release($distributions["10.2-gcc3.3"], "bindist", "0.6.4", 1, true), "10.2-stable" => new Release($distributions["10.2-gcc3.3"], "stable", "current", 2, true), "10.2-unstable" => new Release($distributions["10.2-gcc3.3"], "unstable", "current", 3, true), ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs