]> git.mxchange.org Git - friendica.git/commitdiff
Hide some profile data if not connected.
authorMichael Vogel <icarus@dabo.de>
Tue, 6 Oct 2015 04:56:31 +0000 (06:56 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 6 Oct 2015 04:56:31 +0000 (06:56 +0200)
mod/follow.php
mod/notifications.php
mod/poco.php

index 2c8452b1bffa45211b58b1c348ee518ec0ad926b..4a4429f2e6488df0c161abe41127778ea25bec24 100644 (file)
@@ -67,6 +67,11 @@ function follow_content(&$a) {
        if (!$r)
                $r = array(array("location" => "", "about" => "", "keywords" => ""));
 
+       if($ret['network'] === NETWORK_DIASPORA) {
+               $r[0]["location"] = "";
+               $r[0]["about"] = "";
+       }
+
        $header = $ret["name"];
 
        if ($ret["addr"] != "")
index 69ab592afe276d8640c47f936857f1ffbcb9dba8..6c0391e4e9a9fd57049e7ec433d0012ee158e6fc 100644 (file)
@@ -222,6 +222,13 @@ function notifications_content(&$a) {
 
                                $header .= " (".network_to_name($rr['gnetwork'], $rr['url']).")";
 
+                               // Don't show these data until you are connected. Diaspora is doing the same.
+                               if($rr['gnetwork'] === NETWORK_DIASPORA) {
+                                       $rr['glocation'] = "";
+                                       $rr['gabout'] = "";
+                                       $rr['ggender'] = "";
+                               }
+
                                $notif_content .= replace_macros($tpl, array(
                                        '$header' => htmlentities($header),
                                        '$str_notifytype' => t('Notification type: '),
index f84fc964d9bf8b2e0ab57e3fef7445f4197eda5a..4d16c6ed29933eca2313942e0fc1d956d24f53aa 100644 (file)
@@ -226,6 +226,13 @@ function poco_init(&$a) {
                                        Cache::set("about:".$rr['updated'].":".$rr['nurl'],$about);
                                }
 
+                               // Non connected persons can only see the keywords of a Diaspora account
+                               if ($rr['network'] == NETWORK_DIASPORA) {
+                                       $rr['location'] = "";
+                                       $about = "";
+                                       $rr['gender'] = "";
+                               }
+
                                $entry = array();
                                if($fields_ret['id'])
                                        $entry['id'] = (int)$rr['id'];