CC-5786: Quota Enforcement in the File Upload API
Tweaked this so it will work on self-hosted instances
This commit is contained in:
parent
4add0f0b7b
commit
63e2eda64b
3 changed files with 16 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue