mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix #3862: Profile field type checkbox list with multiple values broken
This commit is contained in:
parent
dfefaea11c
commit
451eb944c8
@ -7,6 +7,7 @@ HumHub Change Log
|
||||
- Fix #3852: Error when OpenSSL extension is not installed
|
||||
- Fix #3849: ModuleCleanupJob produces an error due to ".." in path
|
||||
- Fix #3860: Console/Cli Marketplace actions broken
|
||||
- Fix #3862: Profile field type checkbox list with multiple values broken
|
||||
|
||||
1.4.0 (February 4, 2020)
|
||||
------------------------
|
||||
|
@ -140,7 +140,7 @@ class CheckboxList extends BaseType
|
||||
public function beforeProfileSave($values)
|
||||
{
|
||||
if (is_array($values)) {
|
||||
return implode(',', $values);
|
||||
return implode("\n", $values);
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
@ -183,7 +183,7 @@ class CheckboxList extends BaseType
|
||||
$options = $this->getSelectItems();
|
||||
$translatedValues = [];
|
||||
|
||||
foreach (explode(',', $value) as $v) {
|
||||
foreach (explode("\n", $value) as $v) {
|
||||
if ($v === 'other' && !empty($user->profile->$internalNameOther)) {
|
||||
$translatedValues[] = Html::encode($user->profile->$internalNameOther);
|
||||
} elseif (isset($options[$v])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user