X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FController%2FRequirementSpecTextBlock.pm;h=055281907042d8542badffa0507a6d2443f18887;hb=bf231cac782b2e8272a6cc073318ef1e40311a19;hp=264b83b5ac07b4d43f1a8a9fb373106103397418;hpb=d41efcfe571f88b63aa53492e3e3460d948232d6;p=kivitendo-erp.git diff --git a/SL/Controller/RequirementSpecTextBlock.pm b/SL/Controller/RequirementSpecTextBlock.pm index 264b83b5a..055281907 100644 --- a/SL/Controller/RequirementSpecTextBlock.pm +++ b/SL/Controller/RequirementSpecTextBlock.pm @@ -184,7 +184,7 @@ sub action_dragged_and_dropped { my $dropped_type = $position ne 'last' ? undef : $::form->{dropped_type} =~ m/^ text-blocks- (?:front|back) $/x ? $::form->{dropped_type} : die "Unknown 'dropped_type' parameter"; my $old_where = $self->text_block->output_position; - $self->text_block->db->do_transaction(sub { + $self->text_block->db->with_transaction(sub { 1; $self->text_block->remove_from_list; $self->text_block->output_position($position =~ m/before|after/ ? $dropped_text_block->output_position : $::form->{dropped_type} eq 'text-blocks-front' ? 0 : 1); @@ -482,7 +482,7 @@ sub show_list { sub paste_picture { my ($self, $copied) = @_; - if (!$self->text_block->db->do_transaction(sub { + if (!$self->text_block->db->with_transaction(sub { 1; $self->picture($copied->to_object)->save; # Create new picture from copied data and save $self->text_block->add_pictures($self->picture); # Add new picture to text block