Ignore given list of files

git-svn-id: file:///svn/phpbb/trunk@4291 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-07-20 14:37:14 +00:00
parent 57e12560be
commit e0c4360705

View file

@ -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);
}
}