[freeside-commits] freeside/FS/bin freeside-upgrade,1.24,1.25
Ivan,,,
ivan at wavetail.420.am
Sun Dec 21 13:33:30 PST 2008
- Previous message: [freeside-commits] freeside/FS/bin freeside-cdrd,1.3,1.4
- Next message: [freeside-commits] freeside/FS/FS svc_phone.pm, 1.15, 1.16 svc_acct.pm, 1.247, 1.248 Record.pm, 1.172, 1.173 msgcat.pm, 1.6, 1.7 Setup.pm, 1.14, 1.15 Conf.pm, 1.255, 1.256 svc_Common.pm, 1.47, 1.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv7874/FS/bin
Modified Files:
freeside-upgrade
Log Message:
unique checking for svc_phone like svc_acct, closes: RT#4204 (also a few lines of the new per-agent config snuck in Conf.pm from RT#3989)
Index: freeside-upgrade
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-upgrade,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- freeside-upgrade 30 May 2008 01:33:50 -0000 1.24
+++ freeside-upgrade 21 Dec 2008 21:33:28 -0000 1.25
@@ -77,21 +77,26 @@
if ( $dbh->{Driver}->{Name} =~ /^mysql/i && ! $opt_s ) {
- my $sth = $dbh->prepare(
- "SELECT COUNT(*) FROM duplicate_lock WHERE lockname = 'svc_acct'"
- ) or die $dbh->errstr;
-
- $sth->execute or die $sth->errstr;
-
- unless ( $sth->fetchrow_arrayref->[0] ) {
+ foreach my $table (qw( svc_acct svc_phone )) {
- $sth = $dbh->prepare(
- "INSERT INTO duplicate_lock ( lockname ) VALUES ( 'svc_acct' )"
+ my $sth = $dbh->prepare(
+ "SELECT COUNT(*) FROM duplicate_lock WHERE lockname = '$table'"
) or die $dbh->errstr;
$sth->execute or die $sth->errstr;
+ unless ( $sth->fetchrow_arrayref->[0] ) {
+
+ $sth = $dbh->prepare(
+ "INSERT INTO duplicate_lock ( lockname ) VALUES ( '$table' )"
+ ) or die $dbh->errstr;
+
+ $sth->execute or die $sth->errstr;
+
+ }
+
}
+
}
$dbh->commit or die $dbh->errstr;
- Previous message: [freeside-commits] freeside/FS/bin freeside-cdrd,1.3,1.4
- Next message: [freeside-commits] freeside/FS/FS svc_phone.pm, 1.15, 1.16 svc_acct.pm, 1.247, 1.248 Record.pm, 1.172, 1.173 msgcat.pm, 1.6, 1.7 Setup.pm, 1.14, 1.15 Conf.pm, 1.255, 1.256 svc_Common.pm, 1.47, 1.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list