summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-06-07 01:14:59 -0700
committerIvan Kohler <ivan@freeside.biz>2016-06-07 01:14:59 -0700
commitd3ab0ad3790e23c21b0e7afff6496bbc17f0b24a (patch)
tree74fbb399a19f3bad75bdb2703108465f21c3dfd5
parent6ca906f764454a8377c63ff6170da1e0a0202fd2 (diff)
log with a separate db connection
-rw-r--r--FS/FS/access_user_log.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/access_user_log.pm b/FS/FS/access_user_log.pm
index 9e7f7a00e..ea7af8db5 100644
--- a/FS/FS/access_user_log.pm
+++ b/FS/FS/access_user_log.pm
@@ -2,6 +2,7 @@ package FS::access_user_log;
use base qw( FS::Record );
use strict;
+use FS::UID qw( dbh );
#use FS::Record qw( qsearch qsearchs );
use FS::CurrentUser;
@@ -83,6 +84,11 @@ sub insert_new_path {
'_date' => time,
} );
+ #so we can still log pages after a transaction-aborting SQL error (and then
+ # show the # error page)
+ local($FS::UID::dbh) = dbh->clone;
+ #if current transaction is aborted (if we had a way to check for it)
+
my $error = $self->insert;
die $error if $error;