[freeside-commits] freeside/FS/FS otaker_Mixin.pm,1.3,1.4
Ivan,,,
ivan at wavetail.420.am
Sat Jun 5 13:18:49 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv27611
Modified Files:
otaker_Mixin.pm
Log Message:
should really fix the cust_main_note upgrade bullshit, RT#8580
Index: otaker_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/otaker_Mixin.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- otaker_Mixin.pm 5 Jun 2010 19:50:43 -0000 1.3
+++ otaker_Mixin.pm 5 Jun 2010 20:18:47 -0000 1.4
@@ -11,8 +11,11 @@
my $otaker = shift;
my $access_user = qsearchs('access_user', { 'username' => $otaker } );
if ( !$access_user && $otaker =~ /^(.+), (.+)$/ ) { #same as below..
- $otaker = lc($2.$1);
- $access_user = qsearchs('access_user', { 'username' => $otaker } );
+ my($lastname, $firstname) = ($1, $2);
+ $otaker = lc($firstname.$lastname);
+ $access_user = qsearchs('access_user', { 'first' => $firstname,
+ 'last' => $lastname } )
+ || qsearchs('access_user', { 'username' => $otaker } );
}
croak "can't set otaker: $otaker not found!" unless $access_user; #confess?
$self->usernum( $access_user->usernum );
More information about the freeside-commits
mailing list