Merge branch 'cc-5709-airtime-analyzer-saas' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer-saas
This commit is contained in:
commit
e963157a22
8 changed files with 6 additions and 145 deletions
|
@ -1440,7 +1440,8 @@ class Application_Model_Preference
|
|||
|
||||
public static function getDiskUsage()
|
||||
{
|
||||
return self::getValue("disk_usage");
|
||||
$val = self::getValue("disk_usage");
|
||||
return (strlen($val) == 0) ? 0 : $val;
|
||||
}
|
||||
|
||||
public static function setDiskUsage($value)
|
||||
|
|
|
@ -219,6 +219,9 @@ class Application_Model_Systemstatus
|
|||
$totalSpace = Application_Model_Preference::GetDiskQuota();
|
||||
|
||||
$usedSpace = Application_Model_Preference::getDiskUsage();
|
||||
if (empty($usedSpace)) {
|
||||
$usedSpace = 0;
|
||||
}
|
||||
/* $path = $_SERVER['AIRTIME_BASE']."etc/airtime/num_bytes.ini";
|
||||
$arr = parse_ini_file($path);
|
||||
|
||||
|
@ -240,7 +243,7 @@ class Application_Model_Systemstatus
|
|||
$diskInfo = self::GetDiskInfo();
|
||||
$diskInfo = $diskInfo[0];
|
||||
$diskUsage = $diskInfo->totalSpace - $diskInfo->totalFreeSpace;
|
||||
if ($diskUsage >= $diskInfo->totalSpace) {
|
||||
if ($diskUsage > 0 && $diskUsage >= $diskInfo->totalSpace) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue