diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-28 21:22:47 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-28 21:22:47 +0000 |
commit | 0dc37dc19e55aa4101017532ca02e0f43496d783 (patch) | |
tree | 2a9cafe607c4b9c9831e0c2b0dabcc839cedbfcd | |
parent | 049058a5fa8cf564c7fe686256b960aec36f4cfe (diff) |
Imposing restrictions on configurable attributes in save_preferences (1601425)
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@703 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/AM.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm index b3e94bbb..91df2123 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,9 +1350,10 @@ sub save_preferences { my $myconfig = LedgerSMB::User->new($form->{login}); - foreach my $item (keys %$form) { - $myconfig->{$item} = $form->{$item}; - } + map {$myconfig->{$_} = $form->{$_} if exists $form->{$_}} + qw(name email dateformat signature numberformat vclimit tel fax + company menuwidth countrycode address timeout stylesheet + printer password); $myconfig->{password} = $form->{new_password} if ($form->{old_password} ne $form->{new_password}); |