[freeside-commits] freeside/FS/FS otaker_Mixin.pm,1.2,1.3
Ivan,,,
ivan at wavetail.420.am
Sat Jun 5 12:50:45 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv26312
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.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- otaker_Mixin.pm 5 Jun 2010 18:58:19 -0000 1.2
+++ otaker_Mixin.pm 5 Jun 2010 19:50:43 -0000 1.3
@@ -9,8 +9,12 @@
my $self = shift;
if ( scalar(@_) ) { #set
my $otaker = shift;
- my $access_user = qsearchs('access_user', { 'username' => $otaker } )
- or croak "can't set otaker: $otaker not found!"; #confess?
+ 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 } );
+ }
+ croak "can't set otaker: $otaker not found!" unless $access_user; #confess?
$self->usernum( $access_user->usernum );
$otaker; #not sure return is used anywhere, but just in case
} else { #get
More information about the freeside-commits
mailing list