summaryrefslogtreecommitdiff
path: root/inc/TarLib.class.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-08-23 13:16:03 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-08-23 13:16:03 +0200
commit9c71da5bcf1d0c4d8fbb96023f3be19ce8d7a256 (patch)
treef026bd55f0a789544cfefa2aa9e4aa391ee8148f /inc/TarLib.class.php
parent010720ca07eb2a3f6c828b61e247f1aeaaef503d (diff)
downloadrpg-9c71da5bcf1d0c4d8fbb96023f3be19ce8d7a256.tar.gz
rpg-9c71da5bcf1d0c4d8fbb96023f3be19ce8d7a256.tar.bz2
more verbose errors in tarlib when needed ext is missing
darcs-hash:20080823111603-7ad00-8c6f664b96fa6c959f77965d0d1b721aecedc92c.gz
Diffstat (limited to 'inc/TarLib.class.php')
-rw-r--r--inc/TarLib.class.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
index 5219c4391..0f8f258de 100644
--- a/inc/TarLib.class.php
+++ b/inc/TarLib.class.php
@@ -67,6 +67,7 @@ class TarLib
var $_memdat;
var $_nomf;
var $_result;
+ var $_initerror;
/**
* constructor, initialize the class
@@ -100,6 +101,7 @@ class TarLib
*/
function tarlib($p_filen = ARCHIVE_DYNAMIC , $p_comptype = COMPRESS_AUTO, $p_complevel = 9)
{
+ $this->_initerror = 0;
$this->_nomf = $p_filen; $flag=0;
if($p_comptype && $p_comptype % 5 == 0){$p_comptype /= ARCHIVE_RENAMECOMP; $flag=1;}
@@ -116,12 +118,12 @@ class TarLib
switch($p_comptype)
{
case COMPRESS_GZIP:
- if(!extension_loaded('zlib')) $this->_result = -1;
+ if(!extension_loaded('zlib')) $this->_initerror = -1;
$this->_comptype = COMPRESS_GZIP;
break;
case COMPRESS_BZIP:
- if(!extension_loaded('bz2')) $this->_result = -2;
+ if(!extension_loaded('bz2')) $this->_inierror = -2;
$this->_comptype = COMPRESS_BZIP;
break;
@@ -138,7 +140,7 @@ class TarLib
$this->_comptype = COMPRESS_NONE;
}
- if($this->_result < 0) $this->_comptype = COMPRESS_NONE;
+ if($this->_init_error < 0) $this->_comptype = COMPRESS_NONE;
if($flag) $this->_nomf.= '.'.$this->getCompression(1);
$this->_result = true;