diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-28 21:22:37 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-28 21:22:37 +0000 |
commit | b941cdae4e0dc3904ed5335b2a49a7be81c65a9a (patch) | |
tree | 801790e1b1a84771962d3cc010b4d4d616edb14d | |
parent | dfe2175b5be608a2af9a806762b25a9c9ef19b56 (diff) |
Imposing restrictions on configurable attributes in save_preferences (1601425)
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@702 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/AM.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm index b3e94bbb..4ca04ac5 100755 --- a/LedgerSMB/AM.pm +++ b/LedgerSMB/AM.pm @@ -1329,11 +1329,10 @@ sub save_preferences { # update name $query = qq| UPDATE employee - SET name = ?, - role = ? + SET name = ? WHERE login = ?|; - @queryargs = ($form->{name}, $form->{role}, $form->{login}); + @queryargs = ($form->{name}, $form->{login}); $dbh->prepare($query)->execute(@queryargs) || $form->dberror($query); # get default currency @@ -1351,6 +1350,11 @@ sub save_preferences { my $myconfig = LedgerSMB::User->new($form->{login}); + map {$myconfig->{$_} = $form->{$_} if exists $form->{$_}} + qw(name email dateformat signature numberformat vclimit tel fax + company menuwidth countrycode address timeout stylesheet + printer password); + foreach my $item (keys %$form) { $myconfig->{$item} = $form->{$item}; } |