summaryrefslogtreecommitdiff
path: root/actions/profilesettings.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-23 11:47:00 -0400
committerEvan Prodromou <evan@status.net>2009-10-23 11:47:00 -0400
commit967de946654e96793d11413a46067ac95b356a64 (patch)
tree8d682a3bfe9652543ee4b548adfb6f808f928312 /actions/profilesettings.php
parent943b2bea09b484bd4709b6d2c4a3560ce82a2467 (diff)
update location while saving new profile
Diffstat (limited to 'actions/profilesettings.php')
-rw-r--r--actions/profilesettings.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 5445d9bb2..0a0cc5997 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -306,6 +306,16 @@ class ProfilesettingsAction extends AccountSettingsAction
$profile->homepage = $homepage;
$profile->bio = $bio;
$profile->location = $location;
+
+ $loc = Location::fromName($location);
+
+ if (!empty($loc)) {
+ $profile->lat = $loc->lat;
+ $profile->lon = $loc->lon;
+ $profile->location_id = $loc->location_id;
+ $profile->location_ns = $loc->location_ns;
+ }
+
$profile->profileurl = common_profile_url($nickname);
common_debug('Old profile: ' . common_log_objstring($orig_profile), __FILE__);