mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
add topic reply notice
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
|
||||
class Forum extends NexusModel
|
||||
{
|
||||
protected $fillable = ['sort', 'name', 'description', 'minclassread', 'minclasswrite', 'postcount', 'topiccount', 'minclasscreate', 'forid'];
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user