Skip to content

Commit

Permalink
Add begin transaction so rollback for last part will work
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Nov 12, 2017
1 parent 1049fe4 commit f6fb538
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lhc_web/modules/lhchat/adminchat.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@

session_write_close();

$db->beginTransaction();

if ($chatDataChanged == true) {
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.data_changed',array('chat' => & $chat,'user' => $currentUser));
}
Expand All @@ -104,11 +106,11 @@
$options = $chat->department->inform_options_array;
erLhcoreClassChatWorkflow::chatAcceptedWorkflow(array('department' => $chat->department,'options' => $options),$chat);
};

$db->commit();

$tpl->set('chat',$chat);

echo $tpl->fetch();

} catch (Exception $e) {
Expand Down

0 comments on commit f6fb538

Please sign in to comment.