fix updating of bitwise 'unseen' to account for mysql operator precedence

This commit is contained in:
friendica
2012-10-28 22:08:08 -07:00
parent d0d8971a69
commit e138876199
6 changed files with 20 additions and 9 deletions

View File

@@ -127,7 +127,7 @@ function ping_init(&$a) {
$t1 = dba_timer();
$r = q("SELECT id, item_restrict, item_flags FROM item
WHERE item_restrict = %d and item_flags & %d and `item`.`uid` = %d",
WHERE item_restrict = %d and ( item_flags & %d ) and uid = %d",
intval(ITEM_VISIBLE),
intval(ITEM_UNSEEN),
intval(local_user())