mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Ignore given list of files
git-svn-id: file:///svn/phpbb/trunk@4291 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
57e12560be
commit
e0c4360705
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
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;
|
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 = (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;
|
$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 (is_file($phpbb_root_path . $src))
|
||||||
{
|
{
|
||||||
if (!($fp = @fopen($phpbb_root_path . $src, 'rb')))
|
if (!($fp = @fopen($phpbb_root_path . $src, 'rb')))
|
||||||
|
@ -86,6 +88,11 @@ class archive_zip
|
||||||
|
|
||||||
foreach ($file_ary as $file)
|
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);
|
$this->data($src_prefix . $path . $file, implode('', file($phpbb_root_path . $src . $path . $file)), filemtime($phpbb_root_path . $src . $path . $file), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue