diff options
author | Renato Botelho <renato@netgate.com> | 2016-10-12 12:49:38 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-10-12 12:49:38 -0300 |
commit | 9a3261c1c40c3ebf51d95b9a2497b0a1b1cf62fc (patch) | |
tree | 49773fd57216daf8e283cb41ffc76d22750131db /src | |
parent | 9fc8273a25820a793d167e56f269e1acfc3776d3 (diff) | |
parent | e01e164c82b299f6c0625eefe76fbf0d7708e7a6 (diff) | |
download | pfsense-9a3261c1c40c3ebf51d95b9a2497b0a1b1cf62fc.zip pfsense-9a3261c1c40c3ebf51d95b9a2497b0a1b1cf62fc.tar.gz |
Merge pull request #3153 from NewEraCracker/RELENG_2_3_2+
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/auth.inc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index 2c412a9..7dd03b9 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -1551,15 +1551,22 @@ function get_user_settings($username) { return $settings; } -function save_widget_settings($username, $settings) { +function save_widget_settings($username, $settings, $message = "") { global $config, $userindex; $user = getUserEntry($username); + + if (strlen($message) > 0) { + $msgout = $message; + } else { + $msgout = gettext("Widget configuration has been changed."); + } + if (isset($user['customsettings'])) { $config['system']['user'][$userindex[$username]]['widgets'] = $settings; - write_config(sprintf(gettext("Widget configuration has been changed for user %s."), $username)); + write_config($msgout . " " . sprintf(gettext("(User %s)"), $username)); } else { $config['widgets'] = $settings; - write_config(gettext("Widget configuration has been changed.")); + write_config($msgout); } } |