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

SF.net SVN: ledger-smb:[3453] trunk



Revision: 3453
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3453&view=rev
Author:   einhverfr
Date:     2011-07-06 13:52:35 +0000 (Wed, 06 Jul 2011)

Log Message:
-----------
Save user screen now propertly returns to user location/roles page

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Admin.pm
    trunk/scripts/admin.pl

Modified: trunk/LedgerSMB/DBObject/Admin.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Admin.pm	2011-07-06 13:40:30 UTC (rev 3452)
+++ trunk/LedgerSMB/DBObject/Admin.pm	2011-07-06 13:52:35 UTC (rev 3453)
@@ -7,6 +7,7 @@
 use LedgerSMB::DBObject::Employee;
 use LedgerSMB::DBObject::User;
 use LedgerSMB::Log;
+use strict;
 
 my $logger = Log::Log4perl->get_logger("LedgerSMB::DBObject::Admin");
 
@@ -22,11 +23,12 @@
 sub save_user {
     
     my $self = shift @_;
-    $self->{user_id} = $user_id->{admin__save_user};
-    
+
+    # I deleted some assignments which didn't play well with strict mode
+    # and by my reading probably broke things. --CT
+
     my $employee = LedgerSMB::DBObject::Employee->new( base=>$self);
     
-    $employee->{entity_id} = $entity_id->{id};    
     $employee->save();
     # now, check for user-specific stuff. Is this person a user or not?
     

Modified: trunk/scripts/admin.pl
===================================================================
--- trunk/scripts/admin.pl	2011-07-06 13:40:30 UTC (rev 3452)
+++ trunk/scripts/admin.pl	2011-07-06 13:52:35 UTC (rev 3453)
@@ -100,6 +100,7 @@
     }
     my $groups = $admin->get_roles();
     $admin->{stylesheet} = $request->{stylesheet};
+    $admin->{user_id} = $admin->{user}->{id};
     __edit_page($admin);
 }
 


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