mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12325] Generate the list of the deleted files and folders
https://tracker.phpbb.com/browse/PHPBB3-12325 PHPBB3-12325
This commit is contained in:
committed by
Tristan Darricau
parent
324daf72fe
commit
c5f5520013
@@ -312,4 +312,38 @@ class build_package
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function collect_deleted_files($deleted_filename, $package_name)
|
||||
{
|
||||
$result = array();
|
||||
$file_contents = file($deleted_filename);
|
||||
|
||||
foreach ($file_contents as $line)
|
||||
{
|
||||
$line = trim($line);
|
||||
|
||||
if (!$line)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$line = str_replace('Only in ' . $package_name, '', $line);
|
||||
|
||||
if (substr(0, 1, $line) == '/')
|
||||
{
|
||||
$replace = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$replace = '/';
|
||||
}
|
||||
|
||||
$line = str_replace(': ', $replace, $line);
|
||||
$line = ltrim($line, '/');
|
||||
|
||||
$result[] = $line;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user