added sstvimages directory to repo along w/ matching index.html from other image asset directories. Also added some error handling onto the new storage_helper function to check if the directory exists before reading it

pull/3063/head
Patrick Burns 2024-04-07 12:08:18 -05:00
rodzic 583c2ad191
commit 365671322b
2 zmienionych plików z 25 dodań i 13 usunięć

Wyświetl plik

@ -2,22 +2,26 @@
if (!function_exists('folderSize')) { if (!function_exists('folderSize')) {
function folderSize($dir){ function folderSize($dir){
$count_size = 0; if (is_dir($dir)) {
$count = 0; $count_size = 0;
$dir_array = scandir($dir); $count = 0;
foreach($dir_array as $key=>$filename){ $dir_array = scandir($dir);
if($filename!=".." && $filename!="."){ foreach($dir_array as $key=>$filename){
if(is_dir($dir."/".$filename)){ if($filename!=".." && $filename!="."){
$new_foldersize = folderSize($dir."/".$filename); if(is_dir($dir."/".$filename)){
$count_size = $count_size+ $new_foldersize; $new_foldersize = folderSize($dir."/".$filename);
}else if(is_file($dir."/".$filename)){ $count_size = $count_size+ $new_foldersize;
$count_size = $count_size + filesize($dir."/".$filename); }else if(is_file($dir."/".$filename)){
$count++; $count_size = $count_size + filesize($dir."/".$filename);
$count++;
}
} }
} }
return $count_size;
} else {
return 0;
} }
return $count_size; }
}
} }
if (!function_exists('sizeFormat')) { if (!function_exists('sizeFormat')) {

Wyświetl plik

@ -0,0 +1,8 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>