aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-12-05 02:16:59 -0800
committerfriendica <info@friendica.com>2011-12-05 02:16:59 -0800
commitc8d5274ceea95bdf9df5ca2ab698fa9860319e31 (patch)
treee2d977f26214e30ba4e6e6059d58e26ad287bce3 /include
parent116e20c89dc5874912c7e3870623c747f75238ce (diff)
downloadvolse-hubzilla-c8d5274ceea95bdf9df5ca2ab698fa9860319e31.tar.gz
volse-hubzilla-c8d5274ceea95bdf9df5ca2ab698fa9860319e31.tar.bz2
volse-hubzilla-c8d5274ceea95bdf9df5ca2ab698fa9860319e31.zip
data structures to support hidden friends
Diffstat (limited to 'include')
-rw-r--r--include/api.php4
-rw-r--r--include/text.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/api.php b/include/api.php
index 1196e0aac..9cf4551bd 100644
--- a/include/api.php
+++ b/include/api.php
@@ -296,7 +296,7 @@
// count friends
$r = q("SELECT COUNT(`id`) as `count` FROM `contact`
WHERE `uid` = %d AND `rel` IN ( %d, %d )
- AND `self`=0 AND `blocked`=0",
+ AND `self`=0 AND `blocked`=0 AND `pending`=0 AND `hidden`=0",
intval($uinfo[0]['uid']),
intval(CONTACT_IS_SHARING),
intval(CONTACT_IS_FRIEND)
@@ -305,7 +305,7 @@
$r = q("SELECT COUNT(`id`) as `count` FROM `contact`
WHERE `uid` = %d AND `rel` IN ( %d, %d )
- AND `self`=0 AND `blocked`=0",
+ AND `self`=0 AND `blocked`=0 AND `pending`=0 AND `hidden`=0",
intval($uinfo[0]['uid']),
intval(CONTACT_IS_FOLLOWER),
intval(CONTACT_IS_FRIEND)
diff --git a/include/text.php b/include/text.php
index c4fd76e3e..29e53c663 100644
--- a/include/text.php
+++ b/include/text.php
@@ -539,7 +539,7 @@ function contact_block() {
if((! is_array($a->profile)) || ($a->profile['hide-friends']))
return $o;
- $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0",
+ $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0",
intval($a->profile['uid'])
);
if(count($r)) {
@@ -550,7 +550,7 @@ function contact_block() {
$micropro = Null;
} else {
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d",
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0 ORDER BY RAND() LIMIT %d",
intval($a->profile['uid']),
intval($shown)
);