Skip to content

Commit

Permalink
Core: Custom field type Encrypted text showed hash value
Browse files Browse the repository at this point in the history
  • Loading branch information
mschering committed Nov 6, 2020
1 parent 1d89726 commit 7691c0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Core: Ignore error when creating a link that already exists
- Core: demodata error when clicking 'no'
- Core: welcome message is displayed
- Core: Custom field type Encrypted text showed hash value

03-11-2020 6.4.188
- Core: Refactored custom fields to handle functions inside other functions and detect infinite loops for template fields
Expand Down
7 changes: 4 additions & 3 deletions www/go/core/orm/CustomFieldsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private function normalizeCustomFieldsInput($data, $asText = false) {
$fn = $asText ? 'textToDb' : 'apiToDb';
foreach($this->getCustomFieldModels() as $field) {
//if client didn't post value then skip it
if(array_key_exists($field->databaseName, $data)) {
if(array_key_exists($field->databaseName, $data)) {
$data[$field->databaseName] = $field->getDataType()->$fn(isset($data[$field->databaseName]) ? $data[$field->databaseName] : null, $this, $this->entity);
}
}
Expand All @@ -230,7 +230,8 @@ private function normalizeCustomFieldsInput($data, $asText = false) {
public function getCustomFieldModels() {
$cls = get_class($this->entity);

return $cls::getCustomFieldModels();
$models = $cls::getCustomFieldModels();
return $models;
}

/**
Expand Down Expand Up @@ -307,7 +308,7 @@ public function save() {
}
}

$this->setValues($record);
$this->data = $record;

//After save might need this.
//$this->data['id'] = $this->entity->id;
Expand Down

0 comments on commit 7691c0a

Please sign in to comment.