fix forums.php pm url

This commit is contained in:
xiaomlove
2025-10-02 17:39:55 +07:00
parent 612e83744f
commit aa84bb90c8

View File

@@ -421,7 +421,7 @@ 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=[siteurl]forums.php?action=viewtopic&topicid=%s&page=p%s#pid%s]%s[/url]', $topicid, $id, $id, $topicInfo->subject);
$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;
@@ -467,7 +467,7 @@ if ($action == "post")
$postid = mysql_insert_id() or die($lang_forums['std_post_id_not_available']);
//send pm
$topicInfo = \App\Models\Topic::query()->findOrFail($topicid);
$postUrl = sprintf('[url=[siteurl]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 */