mirror of
https://github.com/friendica/friendica
synced 2025-04-23 09:10:10 +00:00
Replace old database queries with the new ones
This commit is contained in:
parent
8f9757aba5
commit
4ad655ab80
12 changed files with 42 additions and 181 deletions
|
@ -1763,13 +1763,10 @@ function api_statuses_home_timeline($type)
|
|||
$idarray[] = intval($item["id"]);
|
||||
}
|
||||
|
||||
$idlist = implode(",", $idarray);
|
||||
|
||||
if ($idlist != "") {
|
||||
$unseen = q("SELECT `id` FROM `item` WHERE `unseen` AND `id` IN (%s)", $idlist);
|
||||
|
||||
if (!empty($idarray)) {
|
||||
$unseen = dba::exists('item', ['unseen' => true, 'id' => $idarray]);
|
||||
if ($unseen) {
|
||||
q("UPDATE `item` SET `unseen` = 0 WHERE `unseen` AND `id` IN (%s)", $idlist);
|
||||
Item::update(['unseen' => false], ['unseen' => true, 'id' => $idarray]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue