mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-23 13:51:12 +01:00
* Addressbook - fix AJAX duplicate check skipped email addresses
This commit is contained in:
parent
e437a92c7e
commit
a213a286df
@ -2600,12 +2600,10 @@ window.egw_LAB.wait(function() {
|
|||||||
$matches = null;
|
$matches = null;
|
||||||
$fields = explode(',',$GLOBALS['egw_info']['user']['preferences']['addressbook']['duplicate_fields']);
|
$fields = explode(',',$GLOBALS['egw_info']['user']['preferences']['addressbook']['duplicate_fields']);
|
||||||
|
|
||||||
if (preg_match('/^exec\[([^\]]+)\]$/', $name, $matches)) $name = $matches[1]; // remove exec[ ]
|
|
||||||
|
|
||||||
$ret = array('doublicates' => array(), 'msg' => null);
|
$ret = array('doublicates' => array(), 'msg' => null);
|
||||||
|
|
||||||
// if email changed, check for doublicates
|
// if email changed, check for doublicates
|
||||||
if (in_array($name, array('email', 'email_home')) && in_array($name, $fields))
|
if (in_array($name, array('email', 'email_home')) && in_array('contact_'.$name, $fields))
|
||||||
{
|
{
|
||||||
if (preg_match(Etemplate\Widget\Url::EMAIL_PREG, $values[$name])) // only search for real email addresses, to not return to many contacts
|
if (preg_match(Etemplate\Widget\Url::EMAIL_PREG, $values[$name])) // only search for real email addresses, to not return to many contacts
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user