فهرست منبع

fixed bug in Msgs reply

Piotr Labudda 6 سال پیش
والد
کامیت
8f697965fb
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      SE/se-lib/Route/UserMsgs.php

+ 2 - 1
SE/se-lib/Route/UserMsgs.php

@@ -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