quick patch
This commit is contained in:
parent
e77ffc6849
commit
e242567a3c
2 changed files with 6 additions and 3 deletions
|
@ -377,12 +377,15 @@ class Thread
|
||||||
->where('forum_id', $this->forum)
|
->where('forum_id', $this->forum)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
|
// Adding a second to this to avoid own posts getting marked unread
|
||||||
|
$time = time() + 1;
|
||||||
|
|
||||||
// If so update it
|
// If so update it
|
||||||
if ($track) {
|
if ($track) {
|
||||||
DB::table('topics_track')
|
DB::table('topics_track')
|
||||||
->where('user_id', $user)
|
->where('user_id', $user)
|
||||||
->where('topic_id', $this->id)
|
->where('topic_id', $this->id)
|
||||||
->update(['mark_time' => time()]);
|
->update(['mark_time' => $time]);
|
||||||
} else {
|
} else {
|
||||||
// If not create a new record
|
// If not create a new record
|
||||||
DB::table('topics_track')
|
DB::table('topics_track')
|
||||||
|
@ -390,7 +393,7 @@ class Thread
|
||||||
'user_id' => $user,
|
'user_id' => $user,
|
||||||
'topic_id' => $this->id,
|
'topic_id' => $this->id,
|
||||||
'forum_id' => $this->forum,
|
'forum_id' => $this->forum,
|
||||||
'mark_time' => time(),
|
'mark_time' => $time,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
namespace Sakura;
|
namespace Sakura;
|
||||||
|
|
||||||
// Define Sakura version
|
// Define Sakura version
|
||||||
define('SAKURA_VERSION', 20160401);
|
define('SAKURA_VERSION', 20160402);
|
||||||
|
|
||||||
// Define Sakura Path
|
// Define Sakura Path
|
||||||
define('ROOT', __DIR__ . '/');
|
define('ROOT', __DIR__ . '/');
|
||||||
|
|
Reference in a new issue