CC-5786: Quota Enforcement in the File Upload API

Tweaked this so it will work on self-hosted instances
This commit is contained in:
drigato 2014-04-14 12:09:15 -04:00
parent 4add0f0b7b
commit 63e2eda64b
3 changed files with 16 additions and 10 deletions

View file

@ -235,4 +235,16 @@ class Application_Model_Systemstatus
return array_values($partitions);
}
public static function isDiskOverQuota()
{
$diskInfo = self::GetDiskInfo();
$diskInfo = $diskInfo[0];
$diskUsage = $diskInfo->totalSpace - $diskInfo->totalFreeSpace;
if ($diskUsage > $diskInfo->totalSpace) {
return true;
}
return false;
}
}