[freeside-commits] freeside/FS/FS/part_export radiator.pm,1.1,1.2

Ivan,,, ivan at wavetail.420.am
Thu Sep 8 12:15:14 PDT 2005


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail:/tmp/cvs-serv15005

Modified Files:
	radiator.pm 
Log Message:
MySQL is case sensitive about table names!  huh

Index: radiator.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/radiator.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- radiator.pm	9 Aug 2005 21:38:18 -0000	1.1
+++ radiator.pm	8 Sep 2005 19:15:12 -0000	1.2
@@ -1,6 +1,6 @@
 package FS::part_export::radiator;
 
-use vars qw(@ISA %info);
+use vars qw(@ISA %info $radusers);
 use Tie::IxHash;
 use FS::part_export::sqlradius;
 
@@ -21,6 +21,8 @@
 
 @ISA = qw(FS::part_export::sqlradius); #for regular sqlradius accounting
 
+$radusers = 'RADUSERS'; #MySQL is case sensitive about table names!  huh
+
 #sub export_username {
 #  my($self, $svc_acct) = (shift, shift);
 #  $svc_acct->email;
@@ -99,7 +101,7 @@
   my %hash = @_;
 
   my $sth = $dbh->prepare(
-    'INSERT INTO radusers ( '. join(', ', keys %hash ). ' ) '.
+    "INSERT INTO $radusers ( ". join(', ', keys %hash ). ' ) '.
       'VALUES ( '. join(', ', map '?', keys %hash ). ' ) '
   ) or die $dbh->errstr;
   $sth->execute( values %hash )
@@ -114,7 +116,7 @@
   my ( $old_username, %hash ) = @_;
 
   my $sth = $dbh->prepare(
-    'UPDATE radusers SET '. join(', ', map " $_ = ?", keys %hash ).
+    "UPDATE $radusers SET ". join(', ', map " $_ = ?", keys %hash ).
       ' WHERE username = ?'
   ) or die $dbh->errstr;
   $sth->execute( values(%hash), $old_username )
@@ -128,7 +130,7 @@
   my ( $username ) = @_;
 
   my $sth = $dbh->prepare(
-    'DELETE FROM radusers WHERE username = ?'
+    "DELETE FROM $radusers WHERE username = ?"
   ) or die $dbh->errstr;
   $sth->execute( $username )
     or die $sth->errstr;



More information about the freeside-commits mailing list