mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
Merge pull request #3137 from prototech/ticket/13209
[ticket/13209] Fix loss of CPF language field values when switching steps
This commit is contained in:
commit
2f54ab0a24
2 changed files with 14 additions and 2 deletions
|
@ -158,7 +158,19 @@ abstract class type_base implements type_interface
|
|||
}
|
||||
else
|
||||
{
|
||||
return $this->request->variable($key, '', true);
|
||||
$default_value = '';
|
||||
$lang_fields = array(
|
||||
'l_lang_name',
|
||||
'l_lang_explain',
|
||||
'l_lang_default_value',
|
||||
'l_lang_options',
|
||||
);
|
||||
|
||||
if (in_array($key, $lang_fields))
|
||||
{
|
||||
$default_value = array(0 => '');
|
||||
}
|
||||
return $this->request->variable($key, $default_value, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ class type_bool extends type_base
|
|||
}
|
||||
}
|
||||
|
||||
if ($step == 3 && ($field_data[$key] || $action != 'edit') && $key == 'l_lang_options')
|
||||
if ($key == 'l_lang_options' && $this->request->is_set($key))
|
||||
{
|
||||
$field_data[$key] = $this->request->variable($key, array(0 => array('')), true);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue