From e0c436070532f8dead72a3068393188380028d7c Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 20 Jul 2003 14:37:14 +0000 Subject: [PATCH] Ignore given list of files git-svn-id: file:///svn/phpbb/trunk@4291 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_compress.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 87e20ee0a6..4f964a8fad 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -40,7 +40,7 @@ class archive_zip return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1); } - function add_file($src, $src_prefix = '') + function add_file($src, $src_prefix = '', $skip_files = '') { global $phpbb_root_path; @@ -51,6 +51,8 @@ class archive_zip $src_prefix = (strpos($src_prefix, '/') === 0) ? substr($src_prefix, 1) : $src_prefix; $src_prefix = (strrpos($src_prefix, '/') != strlen($src_prefix) - 1) ? (($src_prefix != '') ? $src_prefix . '/' : '') : $src_prefix; + $skip_files = explode(',', $skip_files); + if (is_file($phpbb_root_path . $src)) { if (!($fp = @fopen($phpbb_root_path . $src, 'rb'))) @@ -86,6 +88,11 @@ class archive_zip foreach ($file_ary as $file) { + if (in_array($path . $file, $skip_files)) + { + continue; + } + $this->data($src_prefix . $path . $file, implode('', file($phpbb_root_path . $src . $path . $file)), filemtime($phpbb_root_path . $src . $path . $file), false); } }