use base qw( FS::Record );
use strict;
+use FS::UID qw( dbh );
#use FS::Record qw( qsearch qsearchs );
use FS::CurrentUser;
sub insert_new_path {
my( $class, $path ) = @_;
+ return '' unless defined $FS::CurrentUser::CurrentUser;
+
my $self = $class->new( {
'usernum' => $FS::CurrentUser::CurrentUser->usernum,
'path' => $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;