mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
convert dates in custom attributes into propper format before searching
This commit is contained in:
parent
66917cd156
commit
6ead3fe425
|
@ -443,6 +443,22 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
else
|
||||
$attributes = array();
|
||||
|
||||
foreach($attributes as $attrdefid=>$attribute) {
|
||||
$attrdef = $dms->getAttributeDefinition($attrdefid);
|
||||
if($attribute) {
|
||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
|
||||
if(is_array($attribute)) {
|
||||
if(!empty($attributes[$attrdefid]['from']))
|
||||
$attributes[$attrdefid]['from'] = date('Y-m-d', makeTsFromDate($attribute['from']));
|
||||
if(!empty($attributes[$attrdefid]['to']))
|
||||
$attributes[$attrdefid]['to'] = date('Y-m-d', makeTsFromDate($attribute['to']));
|
||||
} else {
|
||||
$attributes[$attrdefid] = date('Y-m-d', makeTsFromDate($attribute));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Get the page number to display. If the result set contains more than
|
||||
// 25 entries, it is displayed across multiple pages.
|
||||
|
|
Loading…
Reference in New Issue
Block a user