diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php index 5219c4391c4bab2a4f6a1b037e12a934b48df571..0f8f258de730bd8afd055dd2905751e0222b9406 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; diff --git a/install.php b/install.php index f61bc0ee9512631d89c6d7f03b6293e9b2207218..cac9f2cf117a4c335904d2f90ae5ddf15253a4a4 100644 --- a/install.php +++ b/install.php @@ -44,6 +44,7 @@ $dokuwiki_hash = array( '2007-05-24' => 'd80f2740c84c4a6a791fd3c7a353536f', '2007-06-26' => 'b3ca19c7a654823144119980be73cd77', '2008-05-04' => '1e5c42eac3219d9e21927c39e3240aad', + 'devel' => 'e848931c42085af285aabec85df1ac89', ); diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index 3049d410816da0aa7bc18f3cddc712de5a3871cd..a5c906a0b45562ee598d14acada929be3c5af079 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -641,6 +641,12 @@ class ap_manage { else $compress_type = COMPRESS_NONE; $tar = new TarLib($file, $compress_type); + if($tar->_initerror < 0){ + if($conf['allowdebug']){ + msg('TarLib Error: '.$tar->TarErrorStr($tar->_initerror),-1); + } + return false; + } $ok = $tar->Extract(FULL_ARCHIVE, $target, '', 0777); if($ok<1){