[freeside-commits] freeside/FS/FS Conf.pm,1.182,1.183
Ivan,,,
ivan at wavetail.420.am
Wed Feb 28 17:26:40 PST 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv6060
Modified Files:
Conf.pm
Log Message:
this isn't necessary around a single db operation
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -d -r1.182 -r1.183
--- Conf.pm 27 Feb 2007 01:48:06 -0000 1.182
+++ Conf.pm 1 Mar 2007 01:26:38 -0000 1.183
@@ -174,23 +174,15 @@
};
$new->value($value);
- my $oldAutoCommit = $FS::UID::AutoCommit;
- local $FS::UID::AutoCommit = 0;
- my $dbh = dbh;
-
my $error;
if ($old) {
$error = $new->replace($old);
- }else{
+ } else {
$error = $new->insert;
}
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- die "error setting configuration value: $error \n"
- }
-
- $dbh->commit or die $dbh->errstr if $oldAutoCommit;
+ die "error setting configuration value: $error \n"
+ if $error;
}
More information about the freeside-commits
mailing list