improve location change notifications

This commit is contained in:
friendica 2012-05-25 15:56:18 -07:00
parent fafd41f4bf
commit 27c903a8d0

View file

@ -176,9 +176,18 @@ function profiles_post(&$a) {
$changes[] = t('Interests'); $changes[] = t('Interests');
$value = $interest; $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']) { || $country_name != $orig[0]['country-name']) {
$changes[] = t('Location'); $changes[] = t('Location');
$comma1 = ((($locality) && ($region || $country_name)) ? ', ' : ' ');
$comma2 = (($region && $country_name) ? ', ' : '');
$value = $locality . $comma1 . $region . $comma2 . $country_name;
} }
profile_activity($changes,$value); profile_activity($changes,$value);