mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
新增候选提醒到管理组
1. 新增候选提醒到管理组消息 2. 修改发送私信的实现为message::add()
This commit is contained in:
@@ -77,19 +77,22 @@ if ($action == "add")
|
||||
|
||||
if($arg["commentpm"] == 'yes' && $CURUSER['id'] != $arr["owner"])
|
||||
{
|
||||
$added = sqlesc(date("Y-m-d H:i:s"));
|
||||
$locale = get_user_locale($arr['owner']);
|
||||
$subject = sqlesc(nexus_trans("comment.msg_new_comment", [], $locale));
|
||||
$subject = nexus_trans("comment.msg_new_comment", [], $locale);
|
||||
if($type == "torrent")
|
||||
$notifs = sqlesc(nexus_trans("comment.msg_torrent_receive_comment", [], $locale) . " [url=" . get_protocol_prefix() . "$BASEURL/details.php?id=$parent_id] " . $arr['name'] . "[/url].");
|
||||
$notifs = nexus_trans("comment.msg_torrent_receive_comment", [], $locale) . " [url=" . get_protocol_prefix() . "$BASEURL/details.php?id=$parent_id] " . $arr['name'] . "[/url].";
|
||||
if($type == "offer")
|
||||
$notifs = sqlesc(nexus_trans("comment.msg_torrent_receive_comment", [], $locale) . " [url=" . get_protocol_prefix() . "$BASEURL/offers.php?id=$parent_id&off_details=1] " . $arr['name'] . "[/url].");
|
||||
$notifs = nexus_trans("comment.msg_torrent_receive_comment", [], $locale) . " [url=" . get_protocol_prefix() . "$BASEURL/offers.php?id=$parent_id&off_details=1] " . $arr['name'] . "[/url].";
|
||||
if($type == "request")
|
||||
$notifs = sqlesc(nexus_trans("comment.msg_torrent_receive_comment", [], $locale). " [url=" . get_protocol_prefix() . "$BASEURL/viewrequests.php?id=$parent_id&req_details=1] " . $arr['name'] . "[/url].");
|
||||
$notifs = nexus_trans("comment.msg_torrent_receive_comment", [], $locale). " [url=" . get_protocol_prefix() . "$BASEURL/viewrequests.php?id=$parent_id&req_details=1] " . $arr['name'] . "[/url].";
|
||||
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, " . $arr['owner'] . ", $subject, $notifs, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
$Cache->delete_value('user_'.$arr['owner'].'_unread_message_count');
|
||||
$Cache->delete_value('user_'.$arr['owner'].'_inbox_count');
|
||||
\App\Models\Message::add([
|
||||
'sender' => 0,
|
||||
'receiver' => $arr['owner'],
|
||||
'subject' => $subject,
|
||||
'added' => now(),
|
||||
'msg' => $notifs,
|
||||
]);
|
||||
}
|
||||
|
||||
KPS("+",$addcomment_bonus,$CURUSER["id"]);
|
||||
|
||||
Reference in New Issue
Block a user