diff options
author | Andreas Gohr <andi@splitbrain.org> | 2010-08-29 14:22:01 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-08-29 14:22:01 +0200 |
commit | 2c053ed58376c6709596ab48fc40dceb90d4e89d (patch) | |
tree | c8d0f78c2f47f373473419396d3c0855ec671eca /lib/plugins/plugin/classes/ap_download.class.php | |
parent | cb4a07568e84d853fbcd9d5eca37f572fa10786f (diff) | |
parent | 5479a8c3341247ca228026819f20f3ab5c34a80f (diff) | |
download | rpg-2c053ed58376c6709596ab48fc40dceb90d4e89d.tar.gz rpg-2c053ed58376c6709596ab48fc40dceb90d4e89d.tar.bz2 |
Merge branch 'master' into stable
Conflicts:
conf/msg
lib/plugins/acl/ajax.php
Diffstat (limited to 'lib/plugins/plugin/classes/ap_download.class.php')
-rw-r--r-- | lib/plugins/plugin/classes/ap_download.class.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index 90e5de53b..beba0ab07 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -197,17 +197,15 @@ class ap_download extends ap_manage { $ext = $this->guess_archive($file); if (in_array($ext, array('tar','bz','gz'))) { - require_once(DOKU_INC."inc/TarLib.class.php"); - switch($ext){ case 'bz': - $compress_type = COMPRESS_BZIP; + $compress_type = TarLib::COMPRESS_BZIP; break; case 'gz': - $compress_type = COMPRESS_GZIP; + $compress_type = TarLib::COMPRESS_GZIP; break; default: - $compress_type = COMPRESS_NONE; + $compress_type = TarLib::COMPRESS_NONE; } $tar = new TarLib($file, $compress_type); @@ -217,7 +215,7 @@ class ap_download extends ap_manage { } return false; } - $ok = $tar->Extract(FULL_ARCHIVE, $target, '', 0777); + $ok = $tar->Extract(TarLib::FULL_ARCHIVE, $target, '', 0777); if($ok<1){ if($conf['allowdebug']){ @@ -227,7 +225,6 @@ class ap_download extends ap_manage { } return true; } else if ($ext == 'zip') { - require_once(DOKU_INC."inc/ZipLib.class.php"); $zip = new ZipLib(); $ok = $zip->Extract($file, $target); |