summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/save.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/addressbook/save.inc')
-rw-r--r--program/steps/addressbook/save.inc24
1 files changed, 16 insertions, 8 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 94556f96b..e0e38d4d9 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -148,6 +148,15 @@ if (!empty($cid)) {
$result = $plugin['result'];
if ($result) {
+ // show confirmation
+ $OUTPUT->show_message('successfullysaved', 'confirmation', null, false);
+
+ // in search mode, just reload the list (#1490015)
+ if ($_REQUEST['_search']) {
+ $OUTPUT->command('parent.command', 'list');
+ $OUTPUT->send('iframe');
+ }
+
// LDAP DN change
if (is_string($result) && strlen($result)>1) {
$newcid = $result;
@@ -168,8 +177,6 @@ if (!empty($cid)) {
// update the changed col in list
$OUTPUT->command('parent.update_contact_row', $cid, $a_js_cols, $newcid, $source, $record);
- // show confirmation
- $OUTPUT->show_message('successfullysaved', 'confirmation', null, false);
$RCMAIL->overwrite_action('show');
}
else {
@@ -228,8 +235,11 @@ else {
$counts = $CONTACTS->count();
}
- if ((string)$source === (string)$orig_source) {
- // add contact row or jump to the page where it should appear
+ // show confirmation
+ $OUTPUT->show_message('successfullysaved', 'confirmation', null, false);
+
+ // add contact row to the list
+ if (empty($_REQUEST['_search']) && (string)$source === (string)$orig_source) {
$CONTACTS->reset();
$result = $CONTACTS->search($CONTACTS->primary_key, $insert_id);
@@ -240,13 +250,11 @@ else {
$CONTACTS->reset();
$OUTPUT->command('parent.set_rowcount', rcmail_get_rowcount_text($counts));
}
+ // just refresh the list (#1490015)
else {
- // re-set iframe
- $OUTPUT->command('parent.show_contentframe');
+ $OUTPUT->command('parent.command', 'list');
}
- // show confirmation
- $OUTPUT->show_message('successfullysaved', 'confirmation', null, false);
$OUTPUT->send('iframe');
}
else {