]> git.mxchange.org Git - friendica.git/commitdiff
improve location change notifications
authorfriendica <info@friendica.com>
Fri, 25 May 2012 22:56:18 +0000 (15:56 -0700)
committerfriendica <info@friendica.com>
Fri, 25 May 2012 22:56:18 +0000 (15:56 -0700)
mod/profiles.php

index 8e4fba74e05cd2a523be19e15a76a3d6554eb9cf..ca3890eb9466e39aa7be7354e450fd0e38662b76 100644 (file)
@@ -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);