From 9a0992751d2f5411b4fdad422cb6d99c9a1de1ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 27 Jul 2022 09:37:58 +0200 Subject: [PATCH] fix parameters for validate() --- controllers/class.EditDocument.php | 2 +- controllers/class.EditFolder.php | 2 +- op/op.EditAttributes.php | 2 +- op/op.UpdateDocument.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/class.EditDocument.php b/controllers/class.EditDocument.php index 483972780..a67011a65 100644 --- a/controllers/class.EditDocument.php +++ b/controllers/class.EditDocument.php @@ -125,7 +125,7 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common { $attribute = date('Y-m-d', makeTsFromDate($attribute)); break; } - if(!$attrdef->validate($attribute, $document, true)) { + if(!$attrdef->validate($attribute, $document, false)) { $this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute); return false; } diff --git a/controllers/class.EditFolder.php b/controllers/class.EditFolder.php index 9f8aee5aa..a5deb847c 100644 --- a/controllers/class.EditFolder.php +++ b/controllers/class.EditFolder.php @@ -59,7 +59,7 @@ class SeedDMS_Controller_EditFolder extends SeedDMS_Controller_Common { $attribute = date('Y-m-d', makeTsFromDate($attribute)); break; } - if(!$attrdef->validate($attribute, $folder, true)) { + if(!$attrdef->validate($attribute, $folder, false)) { $this->errormsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); return false; } diff --git a/op/op.EditAttributes.php b/op/op.EditAttributes.php index 6a0f75890..3dd4f21b7 100644 --- a/op/op.EditAttributes.php +++ b/op/op.EditAttributes.php @@ -77,7 +77,7 @@ if($attributes) { $attribute = date('Y-m-d', makeTsFromDate($attribute)); break; } - if(!$attrdef->validate($attribute, $version, true)) { + if(!$attrdef->validate($attribute, $version, false)) { $errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg); } diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 9c29d5230..89929b787 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -286,7 +286,7 @@ default: $attribute = date('Y-m-d', makeTsFromDate($attribute)); break; } - if(!$attrdef->validate($attribute)) { + if(!$attrdef->validate($attribute, null, true)) { $errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg); }