diff --git a/web/includes/functions.php b/web/includes/functions.php index 9087c7c6d..2b97456f7 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -1477,12 +1477,12 @@ function getDiskPercent() { else { $spaceString = ''; } - $storageAreas = dbFetchAll("select path, name from Storage order by Id"); - foreach($storageAreas as $storagePath) { - $storageTotal = disk_total_space($storagePath['path']); - $storageFree = disk_free_space($storagePath['path']); + $storageAreas = Storage::find_all(); + foreach($storageAreas as $storageArea) { + $storageTotal = disk_total_space($storageArea->Path); + $storageFree = disk_free_space($storageArea->Path); $storageSpace = round(($storageTotal - $storageFree) / $storageTotal * 100); - $spaceString .= ', '.$storagePath['name'].' '.$storageSpace; + $spaceString .= ', '.$storageArea->Name.' '.$storageSpace.'%'; } return( $spaceString ); } diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index b772412b1..057245de0 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -249,7 +249,7 @@ function getNavBarHTML() {