$orig_sel = $sel;
sort($sel);
- /* The selected addresses are identidied by "backend:nickname". *
+ /* The selected addresses are identidied by "nickname_backend". *
* Sort the list and process one backend at the time */
$prevback = -1;
$subsel = array();
$delfailed = false;
for ($i = 0 ; (($i < sizeof($sel)) && !$delfailed) ; $i++) {
- list($sbackend, $snick) = explode(':', $sel[$i]);
+ list($snick, $sbackend) = explode('_', $sel[$i]);
/* When we get to a new backend, process addresses in *
* previous one. */
$defselected = $sel;
} else {
$abortform = true;
- list($ebackend, $enick) = explode(':', current($sel));
+ list($enick, $ebackend) = explode('_', current($sel));
$olddata = $abook->lookup($enick, $ebackend);
// Test if $olddata really contains anything and return an error message if it doesn't
if (!$olddata) {
/* Handle error messages */
if (!$r) {
/* Display error */
- plain_error_message( nl2br(htmlspecialchars(_("ERROR") .': '. $abook->error)));
+ plain_error_message( nl2br(htmlspecialchars($abook->error)));
/* Display the "new address" form again */
abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$newdata);
echo '<tr><td class="abookEmpty" colspan="'.$colspan.'">'._("Address book is empty").'</td></tr>'."\n";
}
foreach ($source['Addresses'] as $contact) {
- $id = $contact['NickName'] . $current_backend;
+ $id = $contact['NickName'] .'_'. $current_backend;
?>
<tr class=<?php echo '"'.($count%2 ? 'even' : 'odd').'"'; ?>>
<td class="abookField" style="width:1%"><?php echo ($source['BackendWritable'] ? '<input type="checkbox" name="sel[]" value="'.$id.'" id="'.$id.'" />' : ''); ?></td>