]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/profilesettings.php
Moved shareLocation preference check to Profile class
[quix0rs-gnu-social.git] / actions / profilesettings.php
index f380fe4d6dec275b476bd4b3879e8906972515e9..2279732c1eca2145703e5c56d45e4612f0f0cd78 100644 (file)
@@ -150,7 +150,7 @@ class ProfilesettingsAction extends SettingsAction
                 // TRANS: Checkbox label in form for profile settings.
                 $this->checkbox('sharelocation', _('Share my current location when posting notices'),
                                 ($this->arg('sharelocation')) ?
-                                $this->arg('sharelocation') : $user->shareLocation());
+                                $this->arg('sharelocation') : $this->scoped->shareLocation());
                 $this->elementEnd('li');
             }
             Event::handle('EndProfileFormData', array($this));
@@ -185,7 +185,7 @@ class ProfilesettingsAction extends SettingsAction
             $this->checkbox('autosubscribe',
                             // TRANS: Checkbox label in form for profile settings.
                             _('Automatically subscribe to whoever '.
-                              'subscribes to me (best for non-humans).'),
+                              'subscribes to me (best for non-humans)'),
                             ($this->arg('autosubscribe')) ?
                             $this->boolean('autosubscribe') : $user->autosubscribe);
             $this->elementEnd('li');
@@ -311,7 +311,7 @@ class ProfilesettingsAction extends SettingsAction
                     if (!common_valid_profile_tag($tag)) {
                         // TRANS: Validation error in form for profile settings.
                         // TRANS: %s is an invalid tag.
-                        $this->showForm(sprintf(_('Invalid tag: "%s"'), $tag));
+                        $this->showForm(sprintf(_('Invalid tag: "%s".'), $tag));
                         return;
                     }
 
@@ -409,7 +409,7 @@ class ProfilesettingsAction extends SettingsAction
 
                 $exists = false;
 
-                $prefs = User_location_prefs::staticGet('user_id', $user->id);
+                $prefs = User_location_prefs::getKV('user_id', $user->id);
 
                 if (empty($prefs)) {
                     $prefs = new User_location_prefs();
@@ -471,7 +471,7 @@ class ProfilesettingsAction extends SettingsAction
     function nicknameExists($nickname)
     {
         $user = common_current_user();
-        $other = User::staticGet('nickname', $nickname);
+        $other = User::getKV('nickname', $nickname);
         if (!$other) {
             return false;
         } else {