summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Conf.pm14
1 files changed, 3 insertions, 11 deletions
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;
}