- Fix adding contact group record after creating a group
| | |
| | | |
| | | 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'); |
| | |
| | | |
| | | 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'); |