mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Revert "Added clear logs option in admin panel (#775)"
This reverts commit 88cf205962
.
This commit is contained in:
parent
88cf205962
commit
9d5fd03a45
4 changed files with 24 additions and 51 deletions
16
common.php
16
common.php
|
@ -211,22 +211,6 @@ function bb_log($msg, $file_name, $return_path = false)
|
|||
return file_write($msg, $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove files recursively by extension
|
||||
*
|
||||
* @param string $path
|
||||
* @param array $findExtension
|
||||
* @return void
|
||||
*/
|
||||
function remove_files_by_extension(string $path, array $findExtension)
|
||||
{
|
||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $file) {
|
||||
if (in_array(pathinfo($file, PATHINFO_EXTENSION), $findExtension) && is_file($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replace_content = false)
|
||||
{
|
||||
$bytes_written = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue