Permalink
Browse files

MDL-46049 chat: update calendar times on repeating chat sessions

Previously were using the invalid chat id and the calendar entry was not
updated.

Thanks to Andy McGill who worked this out.
  • Loading branch information...
danpoltawski committed Nov 5, 2015
1 parent 1c2a11f commit 600b8152791116d910bfa62a49070fd3469b5f7d
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/chat/lib.php
View
@@ -634,7 +634,7 @@ function chat_update_chat_times($chatid=0) {
$event = new stdClass(); // Update calendar too.
$cond = "modulename='chat' AND instance = :chatid AND timestart <> :chattime";
$params = array('chattime' => $chat->chattime, 'chatid' => $chatid);
$params = array('chattime' => $chat->chattime, 'chatid' => $chat->id);
if ($event->id = $DB->get_field_select('event', 'id', $cond, $params)) {
$event->timestart = $chat->chattime;

0 comments on commit 600b815

Please sign in to comment.