]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialProfileExtensions/actions/profilefields.php
Merge branch 'nightly' of gitorious.org:social/mainline into nightly
[quix0rs-gnu-social.git] / plugins / GNUsocialProfileExtensions / actions / profilefields.php
index d8c4e3dd321b8efa1b638fb7379f6fa09b27857b..1feea867716baa25a26854b83fb9477f079017e8 100644 (file)
@@ -54,7 +54,7 @@ class ProfilefieldsAdminPanelAction extends AdminPanelAction
 
     function saveSettings()
     {
-        $field = GNUsocialProfileExtensionField::staticGet('id', $this->trimmed('id'));
+        $field = GNUsocialProfileExtensionField::getKV('id', $this->trimmed('id'));
         if (!$field)
             $field = new GNUsocialProfileExtensionField();
         $field->title = $this->trimmed('title');
@@ -63,14 +63,12 @@ class ProfilefieldsAdminPanelAction extends AdminPanelAction
         $field->systemname = $this->trimmed('systemname');
         if (!gnusocial_field_systemname_validate($field->systemname)) {
             $this->clientError(_('Internal system name must be unique and consist of only alphanumeric characters!'));
-            return false;
         }
         if ($field->id) {
             if ($field->validate())
                 $field->update();
             else {
                 $this->clientError(_('There was an error with the field data.'));
-                return false;
             }
         }
         else {
@@ -110,7 +108,7 @@ class ProfilefieldsAdminForm extends AdminForm
         $fieldsettitle = _("New Profile Field");
         //Edit a field
         if ($this->out->trimmed('edit')) { 
-            $field = GNUsocialProfileExtensionField::staticGet('id', $this->out->trimmed('edit'));
+            $field = GNUsocialProfileExtensionField::getKV('id', $this->out->trimmed('edit'));
             $title = $field->title;
             $description = $field->description;
             $type = $field->type;