spaces and symbolse in files names

This commit is contained in:
Leorne 2019-12-06 15:39:19 +03:00
parent 8c1c2cf5cd
commit deee41345d
2 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,8 @@ class UserCard extends \common\models\UserCard
if ($post['fields']) { if ($post['fields']) {
FieldsValueNew::deleteAll(['item_id' => $this->id, 'item_type' => FieldsValueNew::TYPE_PROFILE]); FieldsValueNew::deleteAll(['item_id' => $this->id, 'item_type' => FieldsValueNew::TYPE_PROFILE]);
foreach ($post['fields'] as $item) { foreach ($post['fields'] as $item) {
$item['value'] = urldecode($item['value']);
$fieldsValue = new FieldsValueNew(); $fieldsValue = new FieldsValueNew();
$fieldsValue->field_id = $item['field_id']; $fieldsValue->field_id = $item['field_id'];
$fieldsValue->value = $item['value']; $fieldsValue->value = $item['value'];

View File

@ -51,6 +51,8 @@ class Note extends \common\models\Note
FieldsValueNew::deleteAll(['item_id' => $this->id, 'item_type' => FieldsValueNew::TYPE_NOTE]); FieldsValueNew::deleteAll(['item_id' => $this->id, 'item_type' => FieldsValueNew::TYPE_NOTE]);
foreach ( $post['fields'] as $item) { foreach ( $post['fields'] as $item) {
$item['value'] = urldecode($item['value']);
$fieldsValue = new FieldsValueNew(); $fieldsValue = new FieldsValueNew();
$fieldsValue->field_id = $item['field_id']; $fieldsValue->field_id = $item['field_id'];
$fieldsValue->item_id = $this->id; $fieldsValue->item_id = $this->id;