fix parameters for validate()

This commit is contained in:
Uwe Steinmann 2022-07-27 09:37:58 +02:00
parent c21467a24d
commit 9a0992751d
4 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common {
$attribute = date('Y-m-d', makeTsFromDate($attribute)); $attribute = date('Y-m-d', makeTsFromDate($attribute));
break; break;
} }
if(!$attrdef->validate($attribute, $document, true)) { if(!$attrdef->validate($attribute, $document, false)) {
$this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute); $this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false; return false;
} }

View File

@ -59,7 +59,7 @@ class SeedDMS_Controller_EditFolder extends SeedDMS_Controller_Common {
$attribute = date('Y-m-d', makeTsFromDate($attribute)); $attribute = date('Y-m-d', makeTsFromDate($attribute));
break; break;
} }
if(!$attrdef->validate($attribute, $folder, true)) { if(!$attrdef->validate($attribute, $folder, false)) {
$this->errormsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); $this->errormsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false; return false;
} }

View File

@ -77,7 +77,7 @@ if($attributes) {
$attribute = date('Y-m-d', makeTsFromDate($attribute)); $attribute = date('Y-m-d', makeTsFromDate($attribute));
break; break;
} }
if(!$attrdef->validate($attribute, $version, true)) { if(!$attrdef->validate($attribute, $version, false)) {
$errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); $errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute);
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg);
} }

View File

@ -286,7 +286,7 @@ default:
$attribute = date('Y-m-d', makeTsFromDate($attribute)); $attribute = date('Y-m-d', makeTsFromDate($attribute));
break; break;
} }
if(!$attrdef->validate($attribute)) { if(!$attrdef->validate($attribute, null, true)) {
$errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); $errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute);
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg);
} }