[freeside-commits] freeside/FS/bin freeside-sqlradius-reset, 1.13, 1.14
Ivan,,,
ivan at wavetail.420.am
Tue Aug 4 16:43:50 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv32520/bin
Modified Files:
freeside-sqlradius-reset
Log Message:
hopefully ignore errors about deleted accounts and properly finish freeside-sqlradius-reset, RT#5868
Index: freeside-sqlradius-reset
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-sqlradius-reset,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- freeside-sqlradius-reset 4 Aug 2009 22:04:51 -0000 1.13
+++ freeside-sqlradius-reset 4 Aug 2009 23:43:48 -0000 1.14
@@ -53,14 +53,25 @@
my @svc_x =
map { $_->svc_x }
- map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) }
- grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) }
+ #map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) }
+ #grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) }
+ # $export->export_svc;
+ map { @{ $_->[1] } }
+ grep { scalar( @{ $_->[1] } ) }
+ map { [ $_, [ qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) ] ] }
$export->export_svc;
+
foreach my $svc_x ( @svc_x ) {
- $svc_x->check; #set any fixed usergroup so it'll export even if all
- #svc_acct records don't have the group yet
+ #$svc_x->check; #set any fixed usergroup so it'll export even if all
+ # #svc_acct records don't have the group yet
+ #more efficient?
+ my $x = $svc_x->setfixed( $svc_x->_fieldhandlers);
+ unless ( ref($x) ) {
+ warn "WARNING: can't set fixed usergroups for svcnum ". $svc_x->svcnum.
+ "\n";
+ }
if ($overlimit_groups && $svc_x->overlimit) {
$svc_x->usergroup( &{ $svc_x->_fieldhandlers->{'usergroup'} }
More information about the freeside-commits
mailing list