From: friendica Date: Fri, 25 May 2012 22:56:18 +0000 (-0700) Subject: improve location change notifications X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=27c903a8d0d9e8eeca31a21356256593da683da6;p=friendica.git improve location change notifications --- diff --git a/mod/profiles.php b/mod/profiles.php index 8e4fba74e0..ca3890eb94 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -176,9 +176,18 @@ function profiles_post(&$a) { $changes[] = t('Interests'); $value = $interest; } - if($address != $orig[0]['address'] || $locality != $orig[0]['locality'] || $region != $orig[0]['region'] + if($address != $orig[0]['address']) { + $changes[] = t('Address'); + // New address not sent in notifications, potential privacy issues + // in case this leaks to unintended recipients. Yes, it's in the public + // profile but that doesn't mean we have to broadcast it to everybody. + } + if($locality != $orig[0]['locality'] || $region != $orig[0]['region'] || $country_name != $orig[0]['country-name']) { $changes[] = t('Location'); + $comma1 = ((($locality) && ($region || $country_name)) ? ', ' : ' '); + $comma2 = (($region && $country_name) ? ', ' : ''); + $value = $locality . $comma1 . $region . $comma2 . $country_name; } profile_activity($changes,$value);