[freeside-commits] freeside/FS/FS svc_port.pm,1.5,1.6
Ivan,,,
ivan at wavetail.420.am
Sun Jan 30 18:00:19 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv13002
Modified Files:
svc_port.pm
Log Message:
fix what i broke for Pg, RT#10574
Index: svc_port.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_port.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- svc_port.pm 30 Jan 2011 23:18:40 -0000 1.5
+++ svc_port.pm 31 Jan 2011 02:00:17 -0000 1.6
@@ -3,8 +3,9 @@
use strict;
use vars qw($conf $system $DEBUG $me );
use base qw( FS::svc_Common );
-use FS::Record qw( qsearch qsearchs dbh
- str2time_sql str2time_sql_closing concat_sql ); #dbh
+use FS::UID qw( driver_name );
+use FS::Record qw( qsearch qsearchs
+ str2time_sql str2time_sql_closing concat_sql );
use FS::cust_svc;
use GD::Graph;
use GD::Graph::mixed;
@@ -256,8 +257,9 @@
|| $end <= $start || $end < 0 || $end > $now || $start > $now
|| $end-$start > 86400*366 );
- my $_date = str2time_sql. concat_sql([ 'srv_date', "' '", 'srv_time' ]).
- str2time_sql_closing;
+ my $_date = concat_sql([ 'srv_date', "' '", 'srv_time' ]);
+ $_date = "CAST( $_date AS TIMESTAMP )" if driver_name =~ /^Pg/i;
+ $_date = str2time_sql. $_date. str2time_sql_closing;
my $serviceid_sql = "('${serviceid}_IN','${serviceid}_OUT')";
More information about the freeside-commits
mailing list