mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:07 +01:00
Only parse dates if they have a ? wildcard
This commit is contained in:
parent
69a6d18a4c
commit
dfd0f2eee2
@ -388,7 +388,7 @@ class addressbook_sql extends so_sql_cf
|
||||
}
|
||||
|
||||
// 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'];
|
||||
// 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)
|
||||
{
|
||||
// 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