From: ivan Date: Thu, 1 Mar 2007 01:26:38 +0000 (+0000) Subject: this isn't necessary around a single db operation X-Git-Tag: TRIXBOX_2_6~617 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=9bf32910a845c3e720d9b511fd9c3b7b0f580fb4 this isn't necessary around a single db operation --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 594f3b3eb..f2b1bea56 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -174,23 +174,15 @@ sub set { }; $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; }