Commit 7147479e authored by Armando Lüscher's avatar Armando Lüscher

Merge pull request #101 from akalongman/excody_fix

Excody fix
parents aae0d911 8010d2a7
...@@ -509,22 +509,17 @@ class DB ...@@ -509,22 +509,17 @@ class DB
self::insertUser($forward_from, $forward_date); self::insertUser($forward_from, $forward_date);
$forward_from = $forward_from->getId(); $forward_from = $forward_from->getId();
} }
//Insert the new chat user if ($new_chat_participant) {
$new_chat_participant = ''; //Insert the new chat user
if (is_object($new_chat_participant)) {
self::insertUser($new_chat_participant, $date, $chat); self::insertUser($new_chat_participant, $date, $chat);
$new_chat_participant = $new_chat_participant->getId(); $new_chat_participant = $new_chat_participant->getId();
} } elseif ($left_chat_participant) {
//Insert the left chat user
//Insert the left chat user
$left_chat_participant = '';
if (is_object($left_chat_participant)) {
self::insertUser($left_chat_participant, $date, $chat); self::insertUser($left_chat_participant, $date, $chat);
$left_chat_participant = $left_chat_participant->getId(); $left_chat_participant = $left_chat_participant->getId();
} }
try { try {
//message Table //message Table
$sth = self::$pdo->prepare('INSERT IGNORE INTO `' . TB_MESSAGE . '` $sth = self::$pdo->prepare('INSERT IGNORE INTO `' . TB_MESSAGE . '`
...@@ -604,8 +599,8 @@ class DB ...@@ -604,8 +599,8 @@ class DB
$sth->bindParam(':caption', $caption, \PDO::PARAM_STR); $sth->bindParam(':caption', $caption, \PDO::PARAM_STR);
$sth->bindParam(':contact', $contact, \PDO::PARAM_STR); $sth->bindParam(':contact', $contact, \PDO::PARAM_STR);
$sth->bindParam(':location', $location, \PDO::PARAM_STR); $sth->bindParam(':location', $location, \PDO::PARAM_STR);
$sth->bindParam(':new_chat_participant', $new_chat_paticipant, \PDO::PARAM_INT); $sth->bindParam(':new_chat_participant', $new_chat_participant, \PDO::PARAM_INT);
$sth->bindParam(':left_chat_participant', $left_chat_paticipant, \PDO::PARAM_INT); $sth->bindParam(':left_chat_participant', $left_chat_participant, \PDO::PARAM_INT);
$sth->bindParam(':new_chat_title', $new_chat_title, \PDO::PARAM_STR); $sth->bindParam(':new_chat_title', $new_chat_title, \PDO::PARAM_STR);
//Array of Photosize //Array of Photosize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment