mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
convert attribute of type date into format yyyy-mm-dd
This commit is contained in:
parent
877a94c37d
commit
4aa38182db
|
@ -45,6 +45,11 @@ class SeedDMS_Controller_AddSubFolder extends SeedDMS_Controller_Common {
|
|||
if($attrdef = $dms->getAttributeDefinition($attrdefid)) {
|
||||
if(null === ($ret = $this->callHook('validateAttribute', $attrdef, $attribute))) {
|
||||
if($attribute) {
|
||||
switch($attrdef->getType()) {
|
||||
case SeedDMS_Core_AttributeDefinition::type_date:
|
||||
$attribute = date('Y-m-d', makeTsFromDate($attribute));
|
||||
break;
|
||||
}
|
||||
if(!$attrdef->validate($attribute, null, true)) {
|
||||
$this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user