From 9d012efd2ca1e8e8eff18020aef63de0f8e89e78 Mon Sep 17 00:00:00 2001 From: Vincent Blavet Date: Wed, 18 Jun 2003 21:36:28 +0000 Subject: [PATCH] - Syncho with pear/Archive_Tar/Archive/Tar.php 1.14 --- pear/Archive/Tar.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pear/Archive/Tar.php b/pear/Archive/Tar.php index c244aafed84..9176083750d 100644 --- a/pear/Archive/Tar.php +++ b/pear/Archive/Tar.php @@ -60,10 +60,13 @@ class Archive_Tar extends PEAR * declare a new Archive_Tar object, identifying it by the name of the * tar file. * If the compress argument is set the tar will be read or created as a - * gzip compressed TAR file. + * gzip or bz2 compressed TAR file. * * @param string $p_tarname The name of the tar archive to create - * @param boolean $p_compress if true, the archive will be gezip(ped) + * @param string $p_compress can be null, 'gz' or 'bz2'. This + * parameter indicates if gzip or bz2 compression + * is required. For compatibility reason the + * boolean value 'true' means 'gz'. * @access public */ function Archive_Tar($p_tarname, $p_compress = null) @@ -99,7 +102,7 @@ class Archive_Tar extends PEAR } } } else { - if ($p_compress == 'gz') { + if (($p_compress == true) || ($p_compress == 'gz')) { $this->_compress = true; $this->_compress_type = 'gz'; } else if ($p_compress == 'bz2') {