check for quota

This commit is contained in:
Uwe Steinmann 2014-03-26 17:30:19 +01:00
parent 12e36a3d13
commit 3fc340f226
2 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,11 @@ if ($folder->getAccessMode($user) < M_READWRITE) {
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied"));
}
$remain = checkQuota();
if ($remain < 0) {
UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("quota_exceeded", array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain)))));
}
$comment = $_POST["comment"];
$version_comment = $_POST["version_comment"];
if($version_comment == "" && isset($_POST["use_comment"]))

View File

@ -49,6 +49,11 @@ if ($document->isLocked()) {
else $document->setLocked(false);
}
$remain = checkQuota();
if ($remain < 0) {
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("quota_exceeded", array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain)))));
}
if(isset($_POST["comment"]))
$comment = $_POST["comment"];
else