add topic reply notice

This commit is contained in:
xiaomlove
2022-06-18 13:16:36 +08:00
parent c7b75b8349
commit 88a92f745d
9 changed files with 107 additions and 4 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Models;
class Forum extends NexusModel
{
protected $fillable = ['sort', 'name', 'description', 'minclassread', 'minclasswrite', 'postcount', 'topiccount', 'minclasscreate', 'forid'];
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
class Topic extends NexusModel
{
protected $fillable = ['userid', 'subject', 'locked', 'forumid', 'firstpost', 'lastpost', 'sticky', 'hlcolor', 'views'];
public function user()
{
return $this->belongsTo(User::class, 'userid');
}
public function forum()
{
return $this->belongsTo(Forum::class. 'forumid');
}
}
+2 -1
View File
@@ -57,7 +57,7 @@ class TorrentOperationLog extends NexusModel
$subject = nexus_trans("torrent.operation_log.$actionType.notify_subject", [], $locale);
$msg = nexus_trans("torrent.operation_log.$actionType.notify_msg", [
'torrent_name' => $torrentOperationLog->torrent->name,
'detail_url' => sprintf('%s/details.php?id=%s', getSchemeAndHttpHost(), $torrentOperationLog->torrent_id),
'detail_url' => sprintf('details.php?id=%s', $torrentOperationLog->torrent_id),
'operator' => $torrentOperationLog->user->username,
'reason' => $torrentOperationLog->comment,
], $locale);
@@ -70,5 +70,6 @@ class TorrentOperationLog extends NexusModel
];
Message::query()->insert($message);
NexusDB::cache_del("user_{$receiver->id}_unread_message_count");
NexusDB::cache_del("user_{$receiver->id}_inbox_count");
}
}