mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-03 20:12:44 +02:00
fixes #1317 remove cache directory size calculation
This commit is contained in:
@@ -625,32 +625,6 @@ function get_fs_directories($path, $recursive = true)
|
||||
return $dirs;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the size (in bytes) of a filesystem directory
|
||||
*
|
||||
* @since 11
|
||||
* @param string path
|
||||
* @return int
|
||||
*/
|
||||
function get_fs_directory_size($path)
|
||||
{
|
||||
$bytestotal = 0;
|
||||
$path = realpath($path);
|
||||
|
||||
if (!function_exists('exec'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@exec('du -sk '.$path, $returnarray);
|
||||
if (is_array($returnarray) and !empty($returnarray[0]) and preg_match('/^(\d+)\s/', $returnarray[0], $matches))
|
||||
{
|
||||
$bytestotal = $matches[1] * 1024;
|
||||
}
|
||||
|
||||
return $bytestotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* save the rank depending on given categories order
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user