From 0970b407c0c1a14f9e077b4eeb201b39e8454656 Mon Sep 17 00:00:00 2001 From: wiiii <960487551@qq.com> Date: Tue, 16 Sep 2025 14:20:22 +0800 Subject: [PATCH 1/2] Update invite.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改当前纯做种时魔和后宫加成都为零的问题 --- public/invite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/invite.php b/public/invite.php index 0491468b..10b3d1cb 100644 --- a/public/invite.php +++ b/public/invite.php @@ -164,7 +164,7 @@ JS; } else { list($pagertop, $pagerbottom, $limit) = pager($pageSize, $number, "?id=$id&menu=$menuSelected&"); $haremAdditionFactor = (float)get_setting('bonus.harem_addition'); - $ret = sql_query("SELECT id, username, email, uploaded, downloaded, status, warned, enabled, donor, email, seed_points_per_hour, seeding_torrent_count, seeding_torrent_size, last_announce_at FROM users WHERE $whereStr $limit") or sqlerr(); + $ret = sql_query("SELECT id, username, email, uploaded, downloaded, status, warned, enabled, donor, email, seed_points_per_hour, seeding_torrent_count, seeding_torrent_size, seed_points_per_hour, last_announce_at FROM users WHERE $whereStr $limit") or sqlerr(); $num = mysql_num_rows($ret); print(" From 5c2ced967eaf530af1a03235ff9aa3e571606a9b Mon Sep 17 00:00:00 2001 From: Koala Ng Date: Tue, 16 Sep 2025 16:30:42 +0800 Subject: [PATCH 2/2] Update forums.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 通知统一使用message::add方法 --- public/forums.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/public/forums.php b/public/forums.php index ff817abf..5206dc6b 100644 --- a/public/forums.php +++ b/public/forums.php @@ -421,8 +421,8 @@ if ($action == "post") sql_query("UPDATE posts SET body=".sqlesc($body).", editdate=".sqlesc($date).", editedby=".sqlesc($CURUSER['id'])." WHERE id=".sqlesc($id)) or sqlerr(__FILE__, __LINE__); $Cache->delete_value('post_'.$postid.'_content'); //send pm - $postUrl = sprintf('[url=forums.php?action=viewtopic&topicid=%s&page=p%s#pid%s]%s[/url]', $topicid, $id, $id, $topicInfo->subject); - if ($postInfo->userid != $CURUSER['id']) { + $postUrl = sprintf('[url=[siteurl]forums.php?action=viewtopic&topicid=%s&page=p%s#pid%s]%s[/url]', $topicid, $id, $id, $topicInfo->subject); + if (!empty($postInfo->userid) && $postInfo->userid != $CURUSER['id']) { $receiver = $postInfo->user; $locale = $receiver->locale; $notify = [ @@ -432,9 +432,7 @@ if ($action == "post") 'msg' => nexus_trans('forum.post.edited_notify_body', ['topic_subject' => $postUrl, 'editor' => $CURUSER['username']], $locale), 'added' => now(), ]; - \App\Models\Message::query()->insert($notify); - \Nexus\Database\NexusDB::cache_del("user_{$postInfo->userid}_unread_message_count"); - \Nexus\Database\NexusDB::cache_del("user_{$postInfo->userid}_inbox_count"); + \App\Models\Message::add($notify); } } else @@ -470,7 +468,7 @@ if ($action == "post") //send pm $topicInfo = \App\Models\Topic::query()->findOrFail($topicid); $postInfo = \App\Models\Post::query()->findOrFail($quotepostid); - $postUrl = sprintf('[url=forums.php?action=viewtopic&topicid=%s&page=p%s#pid%s]%s[/url]', $topicid, $postid, $postid, $topicInfo->subject); + $postUrl = sprintf('[url=[siteurl]forums.php?action=viewtopic&topicid=%s&page=p%s#pid%s]%s[/url]', $topicid, $postid, $postid, $topicInfo->subject); if ($type == 'reply') { /** @var \App\Models\User $receiver */ @@ -486,9 +484,7 @@ if ($action == "post") 'msg' => nexus_trans('forum.topic.replied_notify_body', ['topic_subject' => $postUrl], $locale), 'added' => now(), ]; - \App\Models\Message::query()->insert($notify); - \Nexus\Database\NexusDB::cache_del("user_{$topicInfo->userid}_unread_message_count"); - \Nexus\Database\NexusDB::cache_del("user_{$topicInfo->userid}_inbox_count"); + \App\Models\Message::add($notify); } } @@ -504,9 +500,7 @@ if ($action == "post") 'msg' => nexus_trans('forum.reply.replied_notify_body', ['topic_subject' => $postUrl, 'replyer' => $CURUSER['username']], $locale), 'added' => now(), ]; - \App\Models\Message::query()->insert($notify); - \Nexus\Database\NexusDB::cache_del("user_{$postInfo->userid}_unread_message_count"); - \Nexus\Database\NexusDB::cache_del("user_{$postInfo->userid}_inbox_count"); + \App\Models\Message::add($notify); } } }