cvs: pearweb /include pear-database.php

From: Date: Thu, 28 Sep 2006 14:38:40 +0000
Subject: cvs: pearweb /include pear-database.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-42302@lists.php.net to get a copy of this message
mj Thu Sep 28 14:38:40 2006 UTC Modified files: /pearweb/include pear-database.php Log: * Converted tarball unpacking to a PHP-only solution. # If we were using PHP 5, there would be no need to read the whole file # into memory before dumping it into $target because we could use # stream_copy_to_stream() or file_put_contents() with its second parameter # being a stream. Oh well. http://cvs.php.net/viewvc.cgi/pearweb/include/pear-database.php?r1=1.309&r2=1.310&diff_format=u Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.309 pearweb/include/pear-database.php:1.310 --- pearweb/include/pear-database.php:1.309 Thu Sep 28 07:23:15 2006 +++ pearweb/include/pear-database.php Thu Sep 28 14:38:40 2006 @@ -17,7 +17,7 @@ | Tomas V.V.Cox <cox@php.net> | | Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ - $Id: pear-database.php,v 1.309 2006/09/28 07:23:15 mj Exp $ + $Id: pear-database.php,v 1.310 2006/09/28 14:38:40 mj Exp $ */ require_once 'DB/storage.php'; @@ -1667,9 +1667,11 @@ } // (6) unpack tarball - $decompress = sprintf("/usr/bin/env gunzip -q -d -c %s > %s/%s-%s.tar", - $file, PEAR_TARBALL_DIR, $package, $version); - system($decompress); + $target = @fopen(PEAR_TARBALL_DIR . "/" . $package . "-" . $version . ".tar", "w+"); + if ($target) { + fwrite($target, file_get_contents("compress.zlib://" . $file)); + fclose($target); + } return array("package_id" => $package_id, "file" => $file

« previous php.pear.cvs (#42302) next »