mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Only parse dates if they have a ? wildcard
This commit is contained in:
parent
cea2c54ee1
commit
2b952c0157
@ -388,7 +388,7 @@ class addressbook_sql extends so_sql_cf
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Understand search by date with wildcard (????.10.??) according to user date preference
|
// Understand search by date with wildcard (????.10.??) according to user date preference
|
||||||
if(is_string($criteria))
|
if(is_string($criteria) && strpos($criteria, '?') !== false)
|
||||||
{
|
{
|
||||||
$date_format = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
|
$date_format = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
|
||||||
// First, check for a 'date', with wildcards, in the user's format
|
// First, check for a 'date', with wildcards, in the user's format
|
||||||
@ -399,7 +399,7 @@ class addressbook_sql extends so_sql_cf
|
|||||||
foreach($matches[0] as $m_id => $match)
|
foreach($matches[0] as $m_id => $match)
|
||||||
{
|
{
|
||||||
// Birthday is Y-m-d
|
// Birthday is Y-m-d
|
||||||
$criteria = '*'.str_replace($match, "{$matches['Y'][$m_id]}-{$matches['m'][$m_id]}-{$matches['d'][$m_id]}",$criteria) . '*';
|
$criteria = str_replace($match, "*{$matches['Y'][$m_id]}-{$matches['m'][$m_id]}-{$matches['d'][$m_id]}*",$criteria);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user