diff --git a/libraries/Forum/Thread.php b/libraries/Forum/Thread.php index 5ba5db3..18dcf57 100644 --- a/libraries/Forum/Thread.php +++ b/libraries/Forum/Thread.php @@ -377,12 +377,15 @@ class Thread ->where('forum_id', $this->forum) ->count(); + // Adding a second to this to avoid own posts getting marked unread + $time = time() + 1; + // If so update it if ($track) { DB::table('topics_track') ->where('user_id', $user) ->where('topic_id', $this->id) - ->update(['mark_time' => time()]); + ->update(['mark_time' => $time]); } else { // If not create a new record DB::table('topics_track') @@ -390,7 +393,7 @@ class Thread 'user_id' => $user, 'topic_id' => $this->id, 'forum_id' => $this->forum, - 'mark_time' => time(), + 'mark_time' => $time, ]); } } diff --git a/sakura.php b/sakura.php index 3e549da..1871838 100644 --- a/sakura.php +++ b/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', 20160401); +define('SAKURA_VERSION', 20160402); // Define Sakura Path define('ROOT', __DIR__ . '/');