[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [702] trunk/LedgerSMB/AM.pm



Revision: 702
          http://svn.sourceforge.net/ledger-smb/?rev=702&view=rev
Author:   tetragon
Date:     2006-11-28 13:22:37 -0800 (Tue, 28 Nov 2006)

Log Message:
-----------
Imposing restrictions on configurable attributes in save_preferences (1601425)

Modified Paths:
--------------
    trunk/LedgerSMB/AM.pm

Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm	2006-11-28 20:47:56 UTC (rev 701)
+++ trunk/LedgerSMB/AM.pm	2006-11-28 21:22:37 UTC (rev 702)
@@ -1329,11 +1329,10 @@
 	# 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 @@
 
 	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};
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.