X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Faccess_user_log.pm;h=ea7af8db5d20d10201dfedc7c49f5d6c9b455a66;hb=91c7741223e84c67b64693cf4bbab6cfbd944e7e;hp=9e7f7a00effff86923fda87c455681bdfa5ebe56;hpb=6a0e1441b1cde044f6a43596551be02dba2074ba;p=freeside.git 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;