forked from friendica/friendica
Use DBA::update() instead of raw SQL for marking circle posts as read
This commit is contained in:
parent
1d752fc839
commit
170bcb4df8
1 changed files with 1 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue