summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/steps/settings/save_prefs.inc15
1 files changed, 11 insertions, 4 deletions
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 64aeb5f81..92e2d8b9d 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -97,10 +97,10 @@ switch ($CURR_SECTION)
break;
}
-$data = rcmail::get_instance()->plugins->exec_hook('preferences_save',
+$plugin = rcmail::get_instance()->plugins->exec_hook('preferences_save',
array('prefs' => $a_user_prefs, 'section' => $CURR_SECTION));
-$a_user_prefs = $data['prefs'];
+$a_user_prefs = $plugin['prefs'];
// don't override these parameters
foreach ((array)$CONFIG['dont_override'] as $p)
@@ -159,10 +159,17 @@ switch ($CURR_SECTION)
break;
}
-if ($USER->save_prefs($a_user_prefs))
+// Save preferences
+if (!$plugin['abort'])
+ $saved = $USER->save_prefs($a_user_prefs);
+else
+ $saved = $plugin['result'];
+
+if ($saved)
$OUTPUT->show_message('successfullysaved', 'confirmation');
+else
+ $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error');
// display the form again
rcmail_overwrite_action('edit-prefs');
-