"fix for bug #1710: email detection when adding participants cause false 'email search' records"

This commit is contained in:
Ralf Becker 2008-09-10 05:44:29 +00:00
parent bf8a23e47e
commit 13bb027ab9

View File

@ -234,7 +234,7 @@ class calendar_uiforms extends calendar_ui
// email or rfc822 addresse (eg. "Ralf Becker <ralf@domain.com>") in the search field
// ToDo: get eTemplate to return that field
if (($email = $_POST['exec']['participants']['resource']['query']) &&
(preg_match('/^(.*<)?([a-z0-9_.@-]{8,})>?$/i',$email,$matches)))
(preg_match('/^(.*<)?([a-z0-9_.-]+@[a-z0-9_.-]{5,})>?$/i',$email,$matches)))
{
// check if email belongs to account or contact --> prefer them over just emails
if (($data = $GLOBALS['egw']->accounts->name2id($matches[2],'account_email')))