From 0b55591d7a88c7a2447c650dd998caf8103c8344 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 31 Jul 2015 13:00:01 +0200 Subject: deprecation of Archive libs --- inc/Tar.class.php | 1 + inc/TarLib.class.php | 89 ---------------------------------------------------- inc/ZipLib.class.php | 1 + inc/load.php | 1 - 4 files changed, 2 insertions(+), 90 deletions(-) delete mode 100644 inc/TarLib.class.php diff --git a/inc/Tar.class.php b/inc/Tar.class.php index 0dc7dace2..57c280d79 100644 --- a/inc/Tar.class.php +++ b/inc/Tar.class.php @@ -43,6 +43,7 @@ * @author Andreas Gohr * @author Bouchon (Maxg) * @license GPL 2 + * @deprecated 2015-05-15 - use splitbrain\PHPArchive\Tar instead */ class Tar { diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php deleted file mode 100644 index dd319a79a..000000000 --- a/inc/TarLib.class.php +++ /dev/null @@ -1,89 +0,0 @@ -error('__construct', '$file'); - - $this->file = $file; - switch($comptype) { - case TarLib::COMPRESS_AUTO: - case TarLib::COMPRESS_DETECT: - $comptype = Tar::COMPRESS_AUTO; - break; - case TarLib::COMPRESS_GZIP: - $comptype = Tar::COMPRESS_GZIP; - break; - case TarLib::COMPRESS_BZIP: - $comptype = Tar::COMPRESS_BZIP; - break; - default: - $comptype = Tar::COMPRESS_NONE; - } - - $this->complevel = $complevel; - - try { - $this->tar = new Tar(); - $this->tar->open($file, $comptype); - } catch(Exception $e) { - $this->_result = false; - } - } - - function Extract($p_what = TarLib::FULL_ARCHIVE, $p_to = '.', $p_remdir = '', $p_mode = 0755) { - if($p_what != TarLib::FULL_ARCHIVE) { - $this->error('Extract', 'Ep_what'); - return 0; - } - - try { - $this->tar->extract($p_to, $p_remdir); - } catch(Exception $e) { - return 0; - } - return 1; - } - - function error($func, $param = '') { - $error = 'TarLib is deprecated and should no longer be used.'; - - if($param) { - $error .= "In this compatibility wrapper, the function '$func' does not accept your value for". - "the parameter '$param' anymore."; - } else { - $error .= "The function '$func' no longer exists in this compatibility wrapper."; - } - - msg($error, -1); - } - - function __call($name, $arguments) { - $this->error($name); - } -} \ No newline at end of file diff --git a/inc/ZipLib.class.php b/inc/ZipLib.class.php index 5b524c4ab..1358ca45e 100644 --- a/inc/ZipLib.class.php +++ b/inc/ZipLib.class.php @@ -6,6 +6,7 @@ * @link http://forum.maxg.info * * Modified for Dokuwiki + * @deprecated 2015-05-15 - use splitbrain\PHPArchive\Zip instead * @author Christopher Smith */ class ZipLib { diff --git a/inc/load.php b/inc/load.php index daf856188..b78a9ee38 100644 --- a/inc/load.php +++ b/inc/load.php @@ -71,7 +71,6 @@ function load_autoload($name){ 'IXR_IntrospectionServer' => DOKU_INC.'inc/IXR_Library.php', 'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php', 'Tar' => DOKU_INC.'inc/Tar.class.php', - 'TarLib' => DOKU_INC.'inc/TarLib.class.php', 'ZipLib' => DOKU_INC.'inc/ZipLib.class.php', 'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php', 'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php', -- cgit v1.2.3