]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/profilesettings.php
Updated styles for profile list re: commit
[quix0rs-gnu-social.git] / actions / profilesettings.php
index 83051c6fd3e8a2cb778c2b32f42a2dc106fff962..0a0cc59973a3709c272a93e74bf1e9176f46c5d5 100644 (file)
@@ -23,6 +23,7 @@
  * @package   StatusNet
  * @author    Evan Prodromou <evan@status.net>
  * @author    Zach Copley <zach@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
  * @copyright 2008-2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
@@ -41,6 +42,7 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * @package  StatusNet
  * @author   Evan Prodromou <evan@status.net>
  * @author   Zach Copley <zach@status.net>
+ * @author   Sarven Capadisli <csarven@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
@@ -70,6 +72,12 @@ class ProfilesettingsAction extends AccountSettingsAction
                   'so people know more about you.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('nickname');
+    }
+
     /**
      * Content area of the page
      *
@@ -298,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__);