[freeside-commits] freeside/FS/FS/part_export sqlradius.pm, 1.25.2.4, 1.25.2.5
Ivan,,,
ivan at wavetail.420.am
Sat Oct 27 20:55:30 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail:/tmp/cvs-serv6525/FS/FS/part_export
Modified Files:
Tag: FREESIDE_1_7_BRANCH
sqlradius.pm
Log Message:
mysql me harder
Index: sqlradius.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/sqlradius.pm,v
retrieving revision 1.25.2.4
retrieving revision 1.25.2.5
diff -u -d -r1.25.2.4 -r1.25.2.5
--- sqlradius.pm 7 Sep 2007 03:36:14 -0000 1.25.2.4
+++ sqlradius.pm 28 Oct 2007 03:55:28 -0000 1.25.2.5
@@ -2,7 +2,7 @@
use vars qw(@ISA $DEBUG %info %options $notes1 $notes2);
use Tie::IxHash;
-use FS::Record qw( dbh qsearch qsearchs );
+use FS::Record qw( dbh qsearch qsearchs str2time_sql );
use FS::part_export;
use FS::svc_acct;
use FS::export_svc;
@@ -560,16 +560,7 @@
qw( datasrc username password ) );
#select a unix time conversion function based on database type
- my $str2time;
- if ( $dbh->{Driver}->{Name} =~ /^mysql(PP)?$/ ) {
- $str2time = 'UNIX_TIMESTAMP(';
- } elsif ( $dbh->{Driver}->{Name} eq 'Pg' ) {
- $str2time = 'EXTRACT( EPOCH FROM ';
- } else {
- warn "warning: unknown database type ". $dbh->{Driver}->{Name}.
- "; guessing how to convert to UNIX timestamps";
- $str2time = 'extract(epoch from ';
- }
+ my $str2time = str2time_sql( $dbh->{Driver}->{Name} );
my @fields = (
qw( username realm framedipaddress
More information about the freeside-commits
mailing list