aboutsummaryrefslogtreecommitdiffstats
path: root/include/contact_widgets.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
committerfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
commit3ebb4a3dc7a369e7a716ab93d02b44b20522080f (patch)
tree5b8daecf7a29c6fe2f0c8572204d9e2bd1713a50 /include/contact_widgets.php
parenta08666be142c484134c2f10cf0c460c8a3c07682 (diff)
downloadvolse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.gz
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.bz2
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.zip
updates
Diffstat (limited to 'include/contact_widgets.php')
-rw-r--r--include/contact_widgets.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index ae88eefb4..a8eb893a5 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -136,9 +136,16 @@ function common_friends_visitor_widget($profile_uid) {
$cid = $zcid = 0;
- if(can_write_wall($a,$profile_uid))
- $cid = remote_user();
- else {
+ if(is_array($_SESSION['remote'])) {
+ foreach($_SESSION['remote'] as $visitor) {
+ if($visitor['uid'] == $profile_uid) {
+ $cid = $visitor['cid'];
+ break;
+ }
+ }
+ }
+
+ if(! $cid) {
if(get_my_url()) {
$r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
dbesc(normalise_link(get_my_url())),