fix updating of bitwise 'unseen' to account for mysql operator precedence
This commit is contained in:
+6
-3
@@ -247,15 +247,18 @@ function profile_content(&$a, $update = 0) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($is_owner) {
|
||||
$r = q("UPDATE `item` SET `item_flags` = item_flags - %d
|
||||
WHERE item_flags & %d AND `uid` = %d",
|
||||
$r = q("UPDATE item SET item_flags = (item_flags ^ %d)
|
||||
WHERE (item_flags & %d) AND (item_flags & %d) AND uid = %d ",
|
||||
intval(ITEM_UNSEEN),
|
||||
intval(ITEM_UNSEEN|ITEM_WALL),
|
||||
intval(ITEM_UNSEEN),
|
||||
intval(ITEM_WALL),
|
||||
intval(local_user())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$o .= conversation($a,$items,'profile',$update);
|
||||
|
||||
if(! $update)
|
||||
|
||||
Reference in New Issue
Block a user