diff options
author | Igor Wiedler <igor@wiedler.ch> | 2010-03-05 20:34:28 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2010-03-06 17:57:27 +0100 |
commit | 5cfa3544334907f7b5eac6b2cc5f38ab067db634 (patch) | |
tree | 729a7c59682a92735dd5ef61caad9477e95d4c38 /phpBB/includes/functions_compress.php | |
parent | 0307d1f4aad7f3caca5146689c792584b5918c9a (diff) | |
download | forums-5cfa3544334907f7b5eac6b2cc5f38ab067db634.tar forums-5cfa3544334907f7b5eac6b2cc5f38ab067db634.tar.gz forums-5cfa3544334907f7b5eac6b2cc5f38ab067db634.tar.bz2 forums-5cfa3544334907f7b5eac6b2cc5f38ab067db634.tar.xz forums-5cfa3544334907f7b5eac6b2cc5f38ab067db634.zip |
[bug/12531] proposed solution for bug #12531
Diffstat (limited to 'phpBB/includes/functions_compress.php')
-rw-r--r-- | phpBB/includes/functions_compress.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index f17c780a65..f422eaa8c1 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -502,8 +502,8 @@ class compress_tar extends compress function compress_tar($mode, $file, $type = '') { $type = (!$type) ? $file : $type; - $this->isgz = (strpos($type, '.tar.gz') !== false || strpos($type, '.tgz') !== false) ? true : false; - $this->isbz = (strpos($type, '.tar.bz2') !== false) ? true : false; + $this->isgz = preg_match('#(\.tar\.gz|\.tgz)$#', $type); + $this->isbz = preg_match('#\.tar\.bz2$#', $type); $this->mode = &$mode; $this->file = &$file; |