cvs: php4 /pear/PEAR Installer.php

From: Date: Mon, 08 Jan 2001 02:54:35 +0000
Subject: cvs: php4 /pear/PEAR Installer.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3434@lists.php.net to get a copy of this message
ssb Sun Jan 7 18:54:35 2001 EDT Modified files: /php4/pear/PEAR Installer.php Log: * display a notice when downloading Index: php4/pear/PEAR/Installer.php diff -u php4/pear/PEAR/Installer.php:1.4 php4/pear/PEAR/Installer.php:1.5 --- php4/pear/PEAR/Installer.php:1.4 Sun Jan 7 18:45:29 2001 +++ php4/pear/PEAR/Installer.php Sun Jan 7 18:54:35 2001 @@ -243,6 +243,7 @@ $downloaddir = "/tmp/pearinstall"; $this->mkDirHier($downloaddir); $downloadfile = "$downloaddir/$file"; + $this->log(1, "downloading $pkgfile..."); $fp = @fopen($pkgfile, "r"); if (!$fp) { return $this->raiseError("$pkgfile: failed to download ($php_errormsg)"); @@ -251,7 +252,9 @@ if (!$wp) { return $this->raiseError("$downloadfile: write failed ($php_errormsg)"); } + $bytes = 0; while ($data = @fread($fp, 16384)) { + $bytes += strlen($data); if (!@fwrite($wp, $data)) { return $this->raiseError("$downloadfile: write failed ($php_errormsg)"); } @@ -259,6 +262,7 @@ $pkgfile = $downloadfile; fclose($fp); fclose($wp); + $this->log(1, "...done, $bytes bytes"); $_PEAR_Installer_tempfiles[] = $downloadfile; } $fp = popen("gzip -dc $pkgfile | tar -tf -", "r");

« previous php.cvs (#3434) next »