Changeset 04310ee in github


Ignore:
Timestamp:
Jul 23, 2011 5:07:28 AM (22 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
24f812dc
Parents:
f52c4f44
Message:

Better message if copying was rejected due to existing entries

File:
1 edited

Legend:

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

    r87a2f68 r04310ee  
    2929$target_group = get_input_value('_togid', RCUBE_INPUT_POST); 
    3030 
    31 $success = 0; 
    32 $maxnum  = $RCMAIL->config->get('max_group_members', 0); 
     31$success  = 0; 
     32$errormsg = 'copyerror'; 
     33$maxnum   = $RCMAIL->config->get('max_group_members', 0); 
    3334 
    3435foreach ($cids as $source => $cid) 
     
    7980            $record = $result->first(); 
    8081            $ids[] = $record['ID']; 
     82            $errormsg = 'contactexists'; 
    8183        } 
    8284    } 
     
    102104            $success = $plugin['result']; 
    103105        } 
     106         
     107        $errormsg = $plugin['message'] ? $plugin['message'] : 'copyerror'; 
    104108    } 
    105109} 
    106110 
    107111if ($success == 0) 
    108     $OUTPUT->show_message('copyerror', 'error'); 
     112    $OUTPUT->show_message($errormsg, 'error'); 
    109113else 
    110114    $OUTPUT->show_message('copysuccess', 'notice', array('nr' => $success)); 
Note: See TracChangeset for help on using the changeset viewer.