[freeside-commits] freeside/httemplate/edit svc_acct.cgi,1.38,1.39
Ivan,,,
ivan at wavetail.420.am
Sun Aug 6 13:21:34 PDT 2006
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv30148/httemplate/edit
Modified Files:
svc_acct.cgi
Log Message:
yow. fix up group handling
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_acct.cgi,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- svc_acct.cgi 6 Aug 2006 09:10:07 -0000 1.38
+++ svc_acct.cgi 6 Aug 2006 20:21:32 -0000 1.39
@@ -70,11 +70,20 @@
$svc_acct->set_default_and_fixed( {
#false laziness w/svc-acct::_fieldhandlers
- 'usergroup' => sub { return $_[0] if ref($_[0]) eq 'ARRAY';
- @groups = split(/\s*,\s*/, shift );
- \@groups;
- },
- } );
+ 'usergroup' => sub {
+ my( $self, $groups ) = @_;
+ if ( ref($groups) eq 'ARRAY' ) {
+ @groups = @$groups;
+ $groups;
+ } elsif ( length($groups) ) {
+ @groups = split(/\s*,\s*/, $groups);
+ [ @groups ];
+ } else {
+ @groups = ();
+ [];
+ }
+ }
+ );
}
More information about the freeside-commits
mailing list