X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=program%2Fsteps%2Fsettings%2Fsave_prefs.inc;h=7d72bfa93d9b057adaea9e86c7a12d5f926b899f;hb=07e1de2dcd3f3ff8910a3680493f035b3c693cf0;hp=1bc98a65b068611eb1b53d7c6e83bd7f4b19329d;hpb=7f5f46ce0922d9fdeb02e45c759aaacbd0ea5f9a;p=roundcube.git diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 1bc98a6..7d72bfa 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -15,7 +15,7 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: save_prefs.inc 4469 2011-01-29 14:55:12Z thomasb $ + $Id: save_prefs.inc 4643 2011-04-11 12:24:00Z alec $ */ @@ -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'); -