Update storage.php
This commit is contained in:
parent
e8c798235c
commit
f882241bce
|
@ -285,8 +285,11 @@ if(!check_function_exists("remove_storage_files")) {
|
||||||
$failed = 0;
|
$failed = 0;
|
||||||
|
|
||||||
$max_age = intval(get_value_in_array("max_age", $options, 0));
|
$max_age = intval(get_value_in_array("max_age", $options, 0));
|
||||||
|
$excludes = get_array(get_value_in_array("excludes", $options, array()));
|
||||||
|
|
||||||
$filenames = iterate_storage_files($storage_type);
|
$filenames = iterate_storage_files($storage_type);
|
||||||
foreach($filenames as $filename) {
|
foreach($filenames as $filename) {
|
||||||
|
if(!in_array($filename, $excludes)) {
|
||||||
$rm = remove_storage_file($filename, array(
|
$rm = remove_storage_file($filename, array(
|
||||||
"storage_type" => $storage_type,
|
"storage_type" => $storage_type,
|
||||||
"max_age" => $max_age
|
"max_age" => $max_age
|
||||||
|
@ -295,6 +298,7 @@ if(!check_function_exists("remove_storage_files")) {
|
||||||
$failed++;
|
$failed++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $failed;
|
return $failed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user