aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-06 17:01:57 -0700
committerFriendika <info@friendika.com>2010-11-06 17:01:57 -0700
commit36d286d062f993ad0596b81481c01f07c54e33bd (patch)
tree070f6e6fd03e57c307497a9c33a33ba5e4835a19
parent8c9aa975faeacbffce9314443aebe9ebc220aac3 (diff)
downloadvolse-hubzilla-36d286d062f993ad0596b81481c01f07c54e33bd.tar.gz
volse-hubzilla-36d286d062f993ad0596b81481c01f07c54e33bd.tar.bz2
volse-hubzilla-36d286d062f993ad0596b81481c01f07c54e33bd.zip
more fixes to introduction discards
-rw-r--r--mod/notifications.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/notifications.php b/mod/notifications.php
index 44d0dfe56..0bd9c6ffc 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -13,7 +13,7 @@ function notifications_post(&$a) {
if($request_id) {
- $r = q("SELECT `id` FROM `intro`
+ $r = q("SELECT * FROM `intro`
WHERE `id` = %d
AND `uid` = %d LIMIT 1",
intval($request_id),
@@ -22,6 +22,7 @@ function notifications_post(&$a) {
if(count($r)) {
$intro_id = $r[0]['id'];
+ $contact_id = $r[0]['contact-id'];
}
else {
notice( t('Invalid request identifier.') . EOL);
@@ -31,8 +32,8 @@ function notifications_post(&$a) {
$r = q("DELETE FROM `intro` WHERE `id` = %d LIMIT 1",
intval($intro_id)
);
- $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($request_id),
+ $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d AND `self` = 0 LIMIT 1",
+ intval($contact_id),
intval(local_user())
);
return;