alecpl
2010-11-23 1f052f0be2b6e4b2db89a70eca62cd6d21f56878
- Fix adding contact group record after creating a group


1 files modified
6 ■■■■■ changed files
program/steps/addressbook/groups.inc 6 ●●●●● patch | view | raw | blame | history
program/steps/addressbook/groups.inc
@@ -79,7 +79,8 @@
  if ($created && $OUTPUT->ajax_call) {
    $OUTPUT->show_message('groupcreated', 'confirmation');
    $OUTPUT->command('insert_contact_group', array('source' => $created));
    $OUTPUT->command('insert_contact_group', array(
      'source' => $source, 'id' => $created['id'], 'name' => $created['name']));
  }
  else if (!$created) {
    $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error');
@@ -98,7 +99,8 @@
  if ($newname && $OUTPUT->ajax_call) {
    $OUTPUT->show_message('grouprenamed', 'confirmation');
    $OUTPUT->command('update_contact_group', array('source' => $source, 'id' => $gid, 'name' => $newname));
    $OUTPUT->command('update_contact_group', array(
      'source' => $source, 'id' => $gid, 'name' => $newname));
  }
  else if (!$newname)
    $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error');