mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-07 05:39:21 +00:00
fix parameters for validate()
This commit is contained in:
parent
c21467a24d
commit
9a0992751d
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user