|
|
@@ -1077,8 +1077,9 @@ function tblMsgsLoadMoreRows(n) {
|
|
|
//DBG::_(true, true, "newMsg", $newMsg, __CLASS__, __FUNCTION__, __LINE__);
|
|
|
|
|
|
if ($newMsg['idReplyTo'] <= 0) throw new Exception("Wrong id reply to msg");
|
|
|
- $parentMsg = $ds->getById('CRM_UI_MSGS', $newMsg['idReplyTo']);
|
|
|
+ $parentMsg = DB::getPDO()->fetchFirst(" select * from CRM_UI_MSGS where ID = :id ", [ ':id' => $newMsg['idReplyTo'] ]);
|
|
|
if (!$parentMsg) throw new Exception("Nie znaleziono wiadomości");
|
|
|
+ $parentMsg = (object)$parentMsg;
|
|
|
|
|
|
$newMsg['idThread'] = ($parentMsg->idThread > 0)? $parentMsg->idThread : $parentMsg->ID;
|
|
|
$newMsg['uiTargetType'] = $uiTargetType;// TODO:? $parentMsg->uiTargetType
|