From 967de946654e96793d11413a46067ac95b356a64 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 23 Oct 2009 11:47:00 -0400 Subject: update location while saving new profile --- actions/profilesettings.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actions/profilesettings.php') 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__); -- cgit v1.2.3-54-g00ecf