projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a1d1dc9
)
log with a separate db connection
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 7 Jun 2016 08:14:49 +0000
(
01:14
-0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 7 Jun 2016 08:14:49 +0000
(
01:14
-0700)
FS/FS/access_user_log.pm
patch
|
blob
|
history
diff --git
a/FS/FS/access_user_log.pm
b/FS/FS/access_user_log.pm
index
15437b7
..
563f3ce
100644
(file)
--- 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 base qw( FS::Record );
use strict;
+use FS::UID qw( dbh );
#use FS::Record qw( qsearch qsearchs );
use FS::CurrentUser;
#use FS::Record qw( qsearch qsearchs );
use FS::CurrentUser;
@@
-85,6
+86,11
@@
sub insert_new_path {
'render_seconds' => $render_seconds,
} );
'render_seconds' => $render_seconds,
} );
+ #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;
my $error = $self->insert;
die $error if $error;