mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 20:53:39 +09:00
- fixed getting temp directory size;
This commit is contained in:
@@ -275,6 +275,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
$size = 0;
|
||||
|
||||
foreach( new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator( $directory ) ) as $file ) {
|
||||
$filename = $file->getFilename();
|
||||
if ( $filename == '.' || $filename == '..' ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$size += $file->getSize();
|
||||
}
|
||||
return round ( $size / 1048576, 2);
|
||||
|
||||
Reference in New Issue
Block a user