* @param boolean $p_compress if true, the archive will be gezip(ped)
* @access public
*/
- function Archive_Tar($p_tarname, $p_compress = false)
+ function Archive_Tar($p_tarname, $p_compress = null)
{
$this->PEAR();
+ if ($p_compress === null) {
+ if (substr($p_tarname, -4) == '.tar') {
+ $p_compress = false;
+ }
+ }
$this->_tarname = $p_tarname;
if ($p_compress) { // assert zlib extension support
$extname = 'zlib';
if (!extension_loaded($extname)) {
- $dlext = (OS_WINDOWS) ? '.dll' : '.so';
- @dl($extname . $dlext);
+ if (OS_WINDOWS) {
+ @dl("php_$extname.dll");
+ } else {
+ @dl("$extname.so");
+ }
}
if (!extension_loaded($extname)) {
die("The extension '$extname' couldn't be found.\n".
</maintainer>
</maintainers>
<release>
- <version>0.4</version>
- <date>2002-05-20</date>
- <notes>Windows bugfix: use forward slashes inside archives</notes>
+ <version>0.5</version>
+ <date>2002-05-27</date>
+ <notes>Less dependant on the zlib extension</notes>
<state>stable</state>
<filelist>
<dir name="Archive">
</filelist>
</release>
<changelog>
+ <release>
+ <version>0.4</version>
+ <date>2002-05-20</date>
+ <notes>Windows bugfix: use forward slashes inside archives</notes>
+ <state>stable</state>
+ </release>
<release>
<version>0.2</version>
<date>2002-02-18</date>