CC-5786: Quota Enforcement in the File Upload API
Small refactor
This commit is contained in:
parent
63e2eda64b
commit
acf91bc627
|
@ -120,10 +120,10 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->isDiskOverQuota()) {
|
if (Application_Model_Systemstatus::isDiskOverQuota()) {
|
||||||
$this->getResponse()
|
$this->getResponse()
|
||||||
->setHttpResponseCode(400)
|
->setHttpResponseCode(400)
|
||||||
->appendBody("ERROR: Disk Quota limit reached.");
|
->appendBody("ERROR: Disk Quota reached.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,13 +430,5 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function isDiskOverQuota()
|
|
||||||
{
|
|
||||||
if (Application_Model_Systemstatus::isDiskOverQuota()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue