kopia lustrzana https://github.com/friendica/friendica
Merge pull request #2489 from annando/1604-unseen
Check before doing the database updatepull/2490/head
commit
1644919880
|
@ -1335,9 +1335,12 @@
|
||||||
|
|
||||||
$idlist = implode(",", $idarray);
|
$idlist = implode(",", $idarray);
|
||||||
|
|
||||||
if ($idlist != "")
|
if ($idlist != "") {
|
||||||
$r = q("UPDATE `item` SET `unseen` = 0 WHERE `unseen` AND `id` IN (%s)", $idlist);
|
$unseen = q("SELECT `id` FROM `item` WHERE `unseen` AND `id` IN (%s)", $idlist);
|
||||||
|
|
||||||
|
if ($unseen)
|
||||||
|
$r = q("UPDATE `item` SET `unseen` = 0 WHERE `unseen` AND `id` IN (%s)", $idlist);
|
||||||
|
}
|
||||||
|
|
||||||
$data = array('$statuses' => $ret);
|
$data = array('$statuses' => $ret);
|
||||||
switch($type){
|
switch($type){
|
||||||
|
|
Ładowanie…
Reference in New Issue