mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-27 05:43:36 +00:00
Only rollback if we are in a transaction.
This commit is contained in:
parent
d6916b205c
commit
13fa85d8ab
@ -38,7 +38,7 @@ function rollback_on_error( $caldav_context, $user_no, $path, $message='', $erro
|
||||
global $c, $bad_events;
|
||||
if ( !$message ) $message = translate('Database error');
|
||||
$qry = new AwlQuery();
|
||||
$qry->Rollback();
|
||||
if ( $qry->TransactionState() != 0 ) $qry->Rollback();
|
||||
if ( $caldav_context ) {
|
||||
if ( isset($bad_events) && isset($c->skip_bad_event_on_import) && $c->skip_bad_event_on_import ) {
|
||||
$bad_events[] = $message;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user