summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2007-03-01 01:26:38 +0000
committerivan <ivan>2007-03-01 01:26:38 +0000
commit9bf32910a845c3e720d9b511fd9c3b7b0f580fb4 (patch)
tree45e7f6edc072d6af03332d4145a0366a176d4524 /FS
parentb7edb246e8b697f12c2b586c5bffef6a2df7ba64 (diff)
this isn't necessary around a single db operation
Diffstat (limited to 'FS')
-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;
}