From 1f6a509876e58435ec1bbe56f8d8c39af6019e01 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 27 Jul 2022 09:24:59 +0200 Subject: [PATCH] set flag $new when calling validate() --- controllers/class.AddDocument.php | 2 +- controllers/class.AddSubFolder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php index d3ecb2679..4a4690db7 100644 --- a/controllers/class.AddDocument.php +++ b/controllers/class.AddDocument.php @@ -64,7 +64,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { $attribute = date('Y-m-d', makeTsFromDate($attribute)); break; } - if(!$attrdef->validate($attribute)) { + if(!$attrdef->validate($attribute, null, true)) { $this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute); return false; } diff --git a/controllers/class.AddSubFolder.php b/controllers/class.AddSubFolder.php index 9b1835a12..cca7aeb4a 100644 --- a/controllers/class.AddSubFolder.php +++ b/controllers/class.AddSubFolder.php @@ -45,7 +45,7 @@ class SeedDMS_Controller_AddSubFolder extends SeedDMS_Controller_Common { if($attrdef = $dms->getAttributeDefinition($attrdefid)) { if(null === ($ret = $this->callHook('validateAttribute', $attrdef, $attribute))) { if($attribute) { - if(!$attrdef->validate($attribute)) { + if(!$attrdef->validate($attribute, null, true)) { $this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute); return false; }