cvs: php4(NEW_UI_API) /pear/PEAR Common.php Installer.php /pear/PEAR/Command Install.php /pear/PEAR/Frontend CLI.php
| From: | Christian Dickmann | Date: | Wed, 29 May 2002 12:59:16 +0000 |
| Subject: | cvs: php4(NEW_UI_API) /pear/PEAR Common.php Installer.php /pear/PEAR/Command Install.php /pear/PEAR/Frontend CLI.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4260@lists.php.net to get a copy of this message | ||
dickmann Wed May 29 08:59:16 2002 EDT
Modified files: (Branch: NEW_UI_API)
/php4/pear/PEAR Common.php Installer.php
/php4/pear/PEAR/Command Install.php
/php4/pear/PEAR/Frontend CLI.php
Log:
fix a bug and add UI::log
Index: php4/pear/PEAR/Common.php
diff -u php4/pear/PEAR/Common.php:1.67.2.2 php4/pear/PEAR/Common.php:1.67.2.3
--- php4/pear/PEAR/Common.php:1.67.2.2 Tue May 28 23:36:45 2002
+++ php4/pear/PEAR/Common.php Wed May 29 08:59:10 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.67.2.2 2002/05/29 03:36:45 ssb Exp $
+// $Id: Common.php,v 1.67.2.3 2002/05/29 12:59:10 dickmann Exp $
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
@@ -210,8 +210,7 @@
{
if ($this->debug >= $level) {
if (is_object($this->ui)) {
- // XXX convert to new Frontend API?
- $this->ui->outputData($msg, 'unknown');
+ $this->ui->log($msg);
} else {
print "$msg\n";
}
Index: php4/pear/PEAR/Installer.php
diff -u php4/pear/PEAR/Installer.php:1.64 php4/pear/PEAR/Installer.php:1.64.2.1
--- php4/pear/PEAR/Installer.php:1.64 Mon May 27 20:11:41 2002
+++ php4/pear/PEAR/Installer.php Wed May 29 08:59:12 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.64 2002/05/28 00:11:41 ssb Exp $
+// $Id: Installer.php,v 1.64.2.1 2002/05/29 12:59:12 dickmann Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -531,6 +531,8 @@
$this->log(1, '...done: ' . number_format($params, 0, '',
',') . ' bytes');
break;
}
+ if (method_exists($this->ui, '_downloadCallback'))
+ $this->ui->_downloadCallback($msg, $params);
}
// }}}
Index: php4/pear/PEAR/Command/Install.php
diff -u php4/pear/PEAR/Command/Install.php:1.31.2.1 php4/pear/PEAR/Command/Install.php:1.31.2.2
--- php4/pear/PEAR/Command/Install.php:1.31.2.1 Mon May 27 22:14:10 2002
+++ php4/pear/PEAR/Command/Install.php Wed May 29 08:59:13 2002
@@ -16,7 +16,7 @@
// | Author: Stig Sæther Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Install.php,v 1.31.2.1 2002/05/28 02:14:10 ssb Exp $
+// $Id: Install.php,v 1.31.2.2 2002/05/29 12:59:13 dickmann Exp $
require_once "PEAR/Command/Common.php";
require_once "PEAR/Installer.php";
@@ -149,7 +149,7 @@
function doInstall($command, $options, $params)
{
if (empty($this->installer)) {
- $this->installer = &new PEAR_Installer($ui);
+ $this->installer = &new PEAR_Installer($this->ui);
}
if ($command == 'upgrade') {
$options[$command] = true;
@@ -166,12 +166,13 @@
return $this->raiseError("$command failed");
}
}
+ return true;
}
function doUninstall($command, $options, $params)
{
if (empty($this->installer)) {
- $this->installer = &new PEAR_Installer($ui);
+ $this->installer = &new PEAR_Installer($this->ui);
}
foreach ($params as $pkg) {
if ($this->installer->uninstall($pkg, $options)) {
Index: php4/pear/PEAR/Frontend/CLI.php
diff -u php4/pear/PEAR/Frontend/CLI.php:1.12.2.3 php4/pear/PEAR/Frontend/CLI.php:1.12.2.4
--- php4/pear/PEAR/Frontend/CLI.php:1.12.2.3 Tue May 28 23:35:20 2002
+++ php4/pear/PEAR/Frontend/CLI.php Wed May 29 08:59:13 2002
@@ -16,7 +16,7 @@
| Author: Stig Sæther Bakken <ssb@fast.no> |
+----------------------------------------------------------------------+
- $Id: CLI.php,v 1.12.2.3 2002/05/29 03:35:20 ssb Exp $
+ $Id: CLI.php,v 1.12.2.4 2002/05/29 12:59:13 dickmann Exp $
*/
require_once "PEAR.php";
@@ -394,6 +394,12 @@
}
// }}}
+
+ function log($text)
+ {
+ return $this->displayLine($text);
+ }
+
// {{{ bold($text)
function bold($text)