mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
Merge branch '1.9' into php8
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.9.8');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.9.9');
|
||||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2025-10-01');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2025-10-02');
|
||||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
|
|||||||
+15
-13
@@ -421,18 +421,20 @@ 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__);
|
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');
|
$Cache->delete_value('post_'.$postid.'_content');
|
||||||
//send pm
|
//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=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']) {
|
if (!empty($postInfo->userid) && $postInfo->userid != $CURUSER['id']) {
|
||||||
$receiver = $postInfo->user;
|
$receiver = $postInfo->user;
|
||||||
$locale = $receiver->locale;
|
if ($receiver) {
|
||||||
$notify = [
|
$locale = $receiver->locale;
|
||||||
'sender' => 0,
|
$notify = [
|
||||||
'receiver' => $receiver->id,
|
'sender' => 0,
|
||||||
'subject' => nexus_trans('forum.post.edited_notify_subject', [], $locale),
|
'receiver' => $receiver->id,
|
||||||
'msg' => nexus_trans('forum.post.edited_notify_body', ['topic_subject' => $postUrl, 'editor' => $CURUSER['username']], $locale),
|
'subject' => nexus_trans('forum.post.edited_notify_subject', [], $locale),
|
||||||
'added' => now(),
|
'msg' => nexus_trans('forum.post.edited_notify_body', ['topic_subject' => $postUrl, 'editor' => $CURUSER['username']], $locale),
|
||||||
];
|
'added' => now(),
|
||||||
\App\Models\Message::add($notify);
|
];
|
||||||
|
\App\Models\Message::add($notify);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -467,14 +469,14 @@ if ($action == "post")
|
|||||||
$postid = mysql_insert_id() or die($lang_forums['std_post_id_not_available']);
|
$postid = mysql_insert_id() or die($lang_forums['std_post_id_not_available']);
|
||||||
//send pm
|
//send pm
|
||||||
$topicInfo = \App\Models\Topic::query()->findOrFail($topicid);
|
$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=forums.php?action=viewtopic&topicid=%s&page=p%s#pid%s]%s[/url]', $topicid, $postid, $postid, $topicInfo->subject);
|
||||||
|
|
||||||
if ($type == 'reply') {
|
if ($type == 'reply') {
|
||||||
/** @var \App\Models\User $receiver */
|
/** @var \App\Models\User $receiver */
|
||||||
if (!empty($topicInfo->userid) && $topicInfo->userid != $CURUSER['id'])
|
if (!empty($topicInfo->userid) && $topicInfo->userid != $CURUSER['id'])
|
||||||
{
|
{
|
||||||
$receiver = $topicInfo->user;
|
$receiver = $topicInfo->user;
|
||||||
if ($receiver->acceptNotification('topic_reply')) {
|
if ($receiver && $receiver->acceptNotification('topic_reply')) {
|
||||||
$locale = $receiver->locale;
|
$locale = $receiver->locale;
|
||||||
$notify = [
|
$notify = [
|
||||||
'sender' => 0,
|
'sender' => 0,
|
||||||
@@ -491,7 +493,7 @@ if ($action == "post")
|
|||||||
$quotePostInfo = \App\Models\Post::query()->find($quotepostid);
|
$quotePostInfo = \App\Models\Post::query()->find($quotepostid);
|
||||||
if ($quotePostInfo && $quotePostInfo->userid != $CURUSER['id']) {
|
if ($quotePostInfo && $quotePostInfo->userid != $CURUSER['id']) {
|
||||||
$receiver = $quotePostInfo->user;
|
$receiver = $quotePostInfo->user;
|
||||||
if($receiver->acceptNotification('topic_reply')) {
|
if($receiver && $receiver->acceptNotification('topic_reply')) {
|
||||||
$locale = $receiver->locale;
|
$locale = $receiver->locale;
|
||||||
$notify = [
|
$notify = [
|
||||||
'sender' => 0,
|
'sender' => 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user