Added limit
This commit is contained in:
parent
4e91379f4a
commit
75097ebf37
1 changed files with 9 additions and 8 deletions
|
@ -762,26 +762,27 @@ function network_content(App $a, $update = 0) {
|
||||||
// on they just get buried deeper. It has happened to me a couple of times also.
|
// on they just get buried deeper. It has happened to me a couple of times also.
|
||||||
|
|
||||||
|
|
||||||
if((! $group) && (! $cid) && (! $star)) {
|
if (!$group && !$cid && !$star) {
|
||||||
|
|
||||||
$unseen = q("SELECT `id` FROM `item` WHERE `unseen` AND `uid` = %d",
|
$unseen = q("SELECT `id` FROM `item` WHERE `unseen` AND `uid` = %d LIMIT 1",
|
||||||
intval(local_user()));
|
intval(local_user()));
|
||||||
|
|
||||||
if ($unseen)
|
if (dbm::is_result($unseen)) {
|
||||||
$r = q("UPDATE `item` SET `unseen` = 0
|
$r = q("UPDATE `item` SET `unseen` = 0
|
||||||
WHERE `unseen` = 1 AND `uid` = %d",
|
WHERE `unseen` = 1 AND `uid` = %d",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
} else {
|
||||||
if ($update_unseen) {
|
if ($update_unseen) {
|
||||||
|
|
||||||
$unseen = q("SELECT `id` FROM `item` ".$update_unseen);
|
$unseen = q("SELECT `id` FROM `item` ".$update_unseen. " LIMIT 1");
|
||||||
|
|
||||||
if ($unseen)
|
if (dbm::is_result($unseen)) {
|
||||||
$r = q("UPDATE `item` SET `unseen` = 0 $update_unseen");
|
$r = q("UPDATE `item` SET `unseen` = 0 $update_unseen");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set this so that the conversation function can find out contact info for our wall-wall items
|
// Set this so that the conversation function can find out contact info for our wall-wall items
|
||||||
$a->page_contact = $a->contact;
|
$a->page_contact = $a->contact;
|
||||||
|
|
Loading…
Reference in a new issue