This commit is contained in:
CHIEFSOFT\ameye
2023-07-15 10:22:35 -04:00
parent f5292bd8e2
commit aeff548da3
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -321,7 +321,7 @@ long WrenchContractMessageList( CVars in, CVars &out )
res = pgsql_query(" SELECT to_char(jc.created, 'YYYY-MM-DD HH24:MI') AS msg_date,"
" m.firstname AS msg_firstname,jc.id as msg_id,jc.message AS msg,"
" jc.msg_type, jc.message,jc.member_id AS sender_id "
" jc.msg_type, jc.message,jc.member_id AS sender_id, jc.uid AS msg_uid "
" FROM jobs_contract_message jc "
" LEFT JOIN members m ON m.id=jc.member_id "
" WHERE jc.contract='%s' ORDER by jc.id DESC", in["contract"].c_str());
@@ -353,6 +353,9 @@ long WrenchContractMessageList( CVars in, CVars &out )
snprintf(vname, sizeof (vname), "message_%05d", i);
out[vname] = rec["message"];
snprintf(vname, sizeof (vname), "msg_uid_%05d", i);
out[vname] = rec["msg_uid"];
snprintf(vname, sizeof (vname), "who_%05d", i);
if( rec["sender_id"].Long() == member_id){
out[vname] = "SENDER";
+1
View File
@@ -300,6 +300,7 @@ class ResultFormatter extends Model
"msg_id" => $out["msg_id_${key}"],
"msg_type" => $out["msg_type_${key}"],
"who" => $out["who_${key}"],
"msg_uid" => $out["msg_uid_${key}"],
);
}
break;