Browse Source

Hide some profile data if not connected.

pull/1941/head
Michael Vogel 6 years ago
parent
commit
901b95e935
3 changed files with 19 additions and 0 deletions
  1. +5
    -0
      mod/follow.php
  2. +7
    -0
      mod/notifications.php
  3. +7
    -0
      mod/poco.php

+ 5
- 0
mod/follow.php View 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"] != "")


+ 7
- 0
mod/notifications.php View 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: '),


+ 7
- 0
mod/poco.php View 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'];


Loading…
Cancel
Save