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');
$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 {
$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;