aboutsummaryrefslogtreecommitdiffstats
path: root/include/socgraph.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-05-03 00:25:56 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-05-03 00:25:56 -0400
commit0446766f0407b45c78031ad9e5029cc9218b025e (patch)
tree030c81fee9826ce80c0bd488f06fd469d2a6afa9 /include/socgraph.php
parent02dc116a9c646ea5683b8df199a7ff492ae6cfcb (diff)
parentff2ddc319d4307e56a1bf48f51f8f948fe0736ca (diff)
downloadvolse-hubzilla-0446766f0407b45c78031ad9e5029cc9218b025e.tar.gz
volse-hubzilla-0446766f0407b45c78031ad9e5029cc9218b025e.tar.bz2
volse-hubzilla-0446766f0407b45c78031ad9e5029cc9218b025e.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: diabook-theme: small fix diabook-theme: made boxes at right_aside sortable use cid rather than uid in perms Modify events_post() in mod/events.php to set the `private` field to true when an event is shared with specific people. This is necessary to have event posts show correctly in Diaspora if an event is created visible only to self, but modified later to be visible to others. use mysql replace on cache items fixing common friends rev update Moved Meta Viewport from global head.tpl to diabook's header * master:
Diffstat (limited to 'include/socgraph.php')
-rw-r--r--include/socgraph.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index 35d754cad..a67b3d9e3 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -99,11 +99,12 @@ function poco_load($cid,$uid = 0,$zcid = 0,$url = null) {
$gcid = $x[0]['id'];
if($x[0]['name'] != $name || $x[0]['photo'] != $profile_photo) {
- q("update gcontact set `name` = '%s', `photo` = '%s', `connect` = '%s'
+ q("update gcontact set `name` = '%s', `photo` = '%s', `connect` = '%s', `url` = '%s'
where `nurl` = '%s' limit 1",
dbesc($name),
dbesc($profile_photo),
dbesc($connect_url),
+ dbesc($profile_url),
dbesc(normalise_link($profile_url))
);
}
@@ -168,7 +169,7 @@ function count_common_friends($uid,$cid) {
$r = q("SELECT count(*) as `total`
FROM `glink` left join `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`cid` = %d and `glink`.`uid` = %d
- and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and id != %d ) ",
+ and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ",
intval($cid),
intval($uid),
intval($uid),
@@ -192,8 +193,8 @@ function common_friends($uid,$cid,$limit=9999,$shuffle = false) {
$r = q("SELECT `gcontact`.*
FROM `glink` left join `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`cid` = %d and `glink`.`uid` = %d
- and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and id != %d )
- sql_extra limit 0, %d",
+ and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d )
+ $sql_extra limit 0, %d",
intval($cid),
intval($uid),
intval($uid),
@@ -211,7 +212,7 @@ function count_common_friends_zcid($uid,$zcid) {
$r = q("SELECT count(*) as `total`
FROM `glink` left join `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`zcid` = %d
- and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 ) ",
+ and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) ",
intval($zcid),
intval($uid)
);
@@ -232,7 +233,7 @@ function common_friends_zcid($uid,$zcid,$limit = 9999,$shuffle) {
$r = q("SELECT `gcontact`.*
FROM `glink` left join `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`zcid` = %d
- and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 )
+ and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 )
$sql_extra limit 0, %d",
intval($zcid),
intval($uid),