aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-28 22:08:08 -0700
committerfriendica <info@friendica.com>2012-10-28 22:08:08 -0700
commite1388761998f231de0c321e6652f7db9ed567c09 (patch)
treed72a64c56e657f73c5568b7f57af9b0c238f8500 /mod/profile.php
parentd0d8971a69040c9dfd0d53a346135979b881c020 (diff)
downloadvolse-hubzilla-e1388761998f231de0c321e6652f7db9ed567c09.tar.gz
volse-hubzilla-e1388761998f231de0c321e6652f7db9ed567c09.tar.bz2
volse-hubzilla-e1388761998f231de0c321e6652f7db9ed567c09.zip
fix updating of bitwise 'unseen' to account for mysql operator precedence
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 8ba9584b1..8fdd38ced 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -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),
- intval(ITEM_UNSEEN|ITEM_WALL),
+ intval(ITEM_WALL),
intval(local_user())
);
}
+
$o .= conversation($a,$items,'profile',$update);
if(! $update)