Changeset b8f14ce in github


Ignore:
Timestamp:
Feb 25, 2011 10:34:29 AM (2 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
e6bb836
Parents:
6b07e62
Message:

Allow multiple records with same e-mail address but show notice to the user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/addressbook/save.inc

    rce988a0 rb8f14ce  
    205205// insert a new contact 
    206206else { 
    207   // check for existing contacts 
     207  // show notice if existing contacts with same e-mail are found 
    208208  $existing = false; 
    209209  foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) { 
    210       if (($res = $CONTACTS->search('email', $email, true, false)) && $res->count) { 
    211           $existing = true; 
     210      if (($res = $CONTACTS->search('email', $email, false, false)) && $res->count) { 
     211          $OUTPUT->show_message('contactexists', 'notice', null, false); 
    212212          break; 
    213213      } 
    214   } 
    215  
    216   // show warning message 
    217   if ($existing) { 
    218     $OUTPUT->show_message('contactexists', 'warning', null, false); 
    219     rcmail_overwrite_action('add'); 
    220     return; 
    221214  } 
    222215 
Note: See TracChangeset for help on using the changeset viewer.