From 170bcb4df82854dbfbce09eb08402e01ecd9dca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CRaroun=E2=80=9D?= Date: Mon, 16 Feb 2026 08:59:01 +0100 Subject: [PATCH] Use DBA::update() instead of raw SQL for marking circle posts as read --- src/Module/Circle.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Module/Circle.php b/src/Module/Circle.php index ce650ff92f..4ac94b5524 100644 --- a/src/Module/Circle.php +++ b/src/Module/Circle.php @@ -216,14 +216,7 @@ class Circle extends BaseModule $circle_id = intval(DI::args()->getArgv()[2]); if ($circle_id && Model\Circle::exists($circle_id, DI::userSession()->getLocalUserId())) { - DBA::e( - "UPDATE `post-user` - SET `unseen` = 0 - WHERE `uid` = ? AND `unseen` = 1 - AND `contact-id` IN (SELECT `contact-id` FROM `group_member` WHERE `gid` = ?)", - DI::userSession()->getLocalUserId(), - $circle_id - ); + DBA::update('post-user', ['unseen' => false], ["`uid` = ? AND `unseen` AND `contact-id` IN (SELECT `contact-id` FROM `group_member` WHERE `gid` = ?)", DI::userSession()->getLocalUserId(), $circle_id]); } DI::baseUrl()->redirect('circle/' . $circle_id); }