cvs: pear /PHP_CompatInfo/CompatInfo Cli.php
| From: | Laurent Laville | Date: | Sun, 06 Apr 2008 16:55:30 +0000 |
| Subject: | cvs: pear /PHP_CompatInfo/CompatInfo Cli.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-51825@lists.php.net to get a copy of this message | ||
farell Sun Apr 6 16:55:30 2008 UTC
Modified files:
/pear/PHP_CompatInfo/CompatInfo Cli.php
Log:
text report support now (as xml report) to display max version info (on a second line)
http://cvs.php.net/viewvc.cgi/pear/PHP_CompatInfo/CompatInfo/Cli.php?r1=1.57&r2=1.58&diff_format=u
Index: pear/PHP_CompatInfo/CompatInfo/Cli.php
diff -u pear/PHP_CompatInfo/CompatInfo/Cli.php:1.57 pear/PHP_CompatInfo/CompatInfo/Cli.php:1.58
--- pear/PHP_CompatInfo/CompatInfo/Cli.php:1.57 Thu Apr 3 20:55:42 2008
+++ pear/PHP_CompatInfo/CompatInfo/Cli.php Sun Apr 6 16:55:30 2008
@@ -15,7 +15,7 @@
* @author Davey Shafik <davey@php.net>
* @author Laurent Laville <pear@laurent-laville.org>
* @license http://www.php.net/license/3_01.txt
PHP License 3.01
- * @version CVS: $Id: Cli.php,v 1.57 2008/04/03 20:55:42 farell Exp $
+ * @version CVS: $Id: Cli.php,v 1.58 2008/04/06 16:55:30 farell Exp $
* @link http://pear.php.net/package/PHP_CompatInfo
* @since File available since Release 0.8.0
*/
@@ -617,7 +617,13 @@
$ds = DIRECTORY_SEPARATOR;
$dir = str_replace(array('\\', '/'), $ds, $this->dir);
- $data = array($dir . $ds . '*' , $info['version']);
+ $data = array($dir . $ds . '*');
+ if (empty($info['max_version'])) {
+ $data[] = $info['version'];
+ } else {
+ $data[] = implode("\r\n", array($info['version'],
$info['max_version']));
+ }
+
if ($o & 2) {
$data[] = $ext;
}
@@ -662,7 +668,14 @@
$file = str_replace(array('\\', '/'), $ds, $file);
$table->addSeparator();
- $data = array($file, $info['version']);
+ $data = array($file);
+ if (empty($info['max_version'])) {
+ $data[] = $info['version'];
+ } else {
+ $data[] = implode("\r\n",
+ array($info['version'],
$info['max_version']));
+ }
+
if ($o & 2) {
$data[] = $ext;
}
@@ -807,8 +820,13 @@
$ext = implode("\r\n", $info['extensions']);
$const = implode("\r\n", array_merge($info['constants'],
$info['tokens']));
+ $data = array($this->file);
+ if (empty($info['max_version'])) {
+ $data[] = $info['version'];
+ } else {
+ $data[] = implode("\r\n", array($info['version'],
$info['max_version']));
+ }
- $data = array($this->file, $info['version']);
if ($o & 2) {
$data[] = $ext;
}
@@ -944,8 +962,16 @@
$ext = implode("\r\n", $info['extensions']);
$const = implode("\r\n", $info['constants']);
+ $data = array();
+ if (empty($info['max_version'])) {
+ $data[] = $info['version'];
+ } else {
+ $data[] = implode("\r\n", array($info['version'],
$info['max_version']));
+ }
+ $data[] = $ext;
+ $data[] = $const;
- $table->addRow(array($info['version'], $ext, $const));
+ $table->addRow($data);
$output = $table->getTable();