projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7edb24
)
this isn't necessary around a single db operation
author
ivan
<ivan>
Thu, 1 Mar 2007 01:26:38 +0000
(
01:26
+0000)
committer
ivan
<ivan>
Thu, 1 Mar 2007 01:26:38 +0000
(
01:26
+0000)
FS/FS/Conf.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
594f3b3
..
f2b1bea
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-174,23
+174,15
@@
sub set {
};
$new->value($value);
};
$new->value($value);
- my $oldAutoCommit = $FS::UID::AutoCommit;
- local $FS::UID::AutoCommit = 0;
- my $dbh = dbh;
-
my $error;
if ($old) {
$error = $new->replace($old);
my $error;
if ($old) {
$error = $new->replace($old);
- }
else
{
+ }
else
{
$error = $new->insert;
}
$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;
}
}