diff options
author | zottel <github@zottel.net> | 2012-03-31 00:30:34 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-03-31 00:30:34 +0200 |
commit | f39e8126773e2a030cf84c8b9d428cc78546c1b9 (patch) | |
tree | ec1318b325ec3dc5ab2bc4ded5dae1c657b8fc7b /mod/notifications.php | |
parent | 2212e6931096d188be2dea27bcb4877f16c5c2f8 (diff) | |
parent | aace55df0ad279d74c5e612078c3f29d114389dc (diff) | |
download | volse-hubzilla-f39e8126773e2a030cf84c8b9d428cc78546c1b9.tar.gz volse-hubzilla-f39e8126773e2a030cf84c8b9d428cc78546c1b9.tar.bz2 volse-hubzilla-f39e8126773e2a030cf84c8b9d428cc78546c1b9.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/notifications.php')
-rwxr-xr-x | mod/notifications.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/notifications.php b/mod/notifications.php index 551b307db..690a99562 100755 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -37,7 +37,11 @@ function notifications_post(&$a) { intval($intro_id) ); if(! $fid) { - $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d AND `self` = 0 LIMIT 1", + + // The check for blocked and pending is in case the friendship was already approved + // and we just want to get rid of the now pointless notification + + $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d AND `self` = 0 AND `blocked` = 1 AND `pending` = 1 LIMIT 1", intval($contact_id), intval(local_user()) ); |