mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-06 10:00:58 +00:00
check if attr definition exists when building a search query
This commit is contained in:
parent
593c6f5f95
commit
00a5f59bc3
|
@ -535,16 +535,17 @@ if($fullsearch) {
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
|
|
||||||
foreach($attributes as $attrdefid=>$attribute) {
|
foreach($attributes as $attrdefid=>$attribute) {
|
||||||
$attrdef = $dms->getAttributeDefinition($attrdefid);
|
|
||||||
if($attribute) {
|
if($attribute) {
|
||||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
|
if($attrdef = $dms->getAttributeDefinition($attrdefid)) {
|
||||||
if(is_array($attribute)) {
|
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
|
||||||
if(!empty($attributes[$attrdefid]['from']))
|
if(is_array($attribute)) {
|
||||||
$attributes[$attrdefid]['from'] = date('Y-m-d', makeTsFromDate($attribute['from']));
|
if(!empty($attributes[$attrdefid]['from']))
|
||||||
if(!empty($attributes[$attrdefid]['to']))
|
$attributes[$attrdefid]['from'] = date('Y-m-d', makeTsFromDate($attribute['from']));
|
||||||
$attributes[$attrdefid]['to'] = date('Y-m-d', makeTsFromDate($attribute['to']));
|
if(!empty($attributes[$attrdefid]['to']))
|
||||||
} else {
|
$attributes[$attrdefid]['to'] = date('Y-m-d', makeTsFromDate($attribute['to']));
|
||||||
$attributes[$attrdefid] = date('Y-m-d', makeTsFromDate($attribute));
|
} else {
|
||||||
|
$attributes[$attrdefid] = date('Y-m-d', makeTsFromDate($attribute));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user