summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Blavet <vblavet@php.net>2003-06-18 21:36:28 +0000
committerVincent Blavet <vblavet@php.net>2003-06-18 21:36:28 +0000
commit9d012efd2ca1e8e8eff18020aef63de0f8e89e78 (patch)
tree63a95dda9f778b4bb4e6acc5c2dc907808ebd120
parent8eef152174597a9c173a6e11b69329892d131d21 (diff)
downloadphp-git-9d012efd2ca1e8e8eff18020aef63de0f8e89e78.tar.gz
- Syncho with pear/Archive_Tar/Archive/Tar.php 1.14
-rw-r--r--pear/Archive/Tar.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/pear/Archive/Tar.php b/pear/Archive/Tar.php
index c244aafed8..9176083750 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') {