Fix disk quota message
This commit is contained in:
parent
e11afd4e71
commit
a8c428bfb0
|
@ -219,7 +219,7 @@ class Application_Model_Systemstatus
|
||||||
$totalSpace = Application_Model_Preference::GetDiskQuota();
|
$totalSpace = Application_Model_Preference::GetDiskQuota();
|
||||||
|
|
||||||
$usedSpace = Application_Model_Preference::getDiskUsage();
|
$usedSpace = Application_Model_Preference::getDiskUsage();
|
||||||
if (!$usedSpace) {
|
if (empty($usedSpace)) {
|
||||||
$usedSpace = 0;
|
$usedSpace = 0;
|
||||||
}
|
}
|
||||||
/* $path = $_SERVER['AIRTIME_BASE']."etc/airtime/num_bytes.ini";
|
/* $path = $_SERVER['AIRTIME_BASE']."etc/airtime/num_bytes.ini";
|
||||||
|
@ -243,7 +243,7 @@ class Application_Model_Systemstatus
|
||||||
$diskInfo = self::GetDiskInfo();
|
$diskInfo = self::GetDiskInfo();
|
||||||
$diskInfo = $diskInfo[0];
|
$diskInfo = $diskInfo[0];
|
||||||
$diskUsage = $diskInfo->totalSpace - $diskInfo->totalFreeSpace;
|
$diskUsage = $diskInfo->totalSpace - $diskInfo->totalFreeSpace;
|
||||||
if ($diskUsage >= $diskInfo->totalSpace) {
|
if ($diskUsage > 0 && $diskUsage >= $diskInfo->totalSpace) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue