mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/12759] Fix type_bool and type_dropdown's UCP fields
PHPBB3-12759
This commit is contained in:
parent
98262a5a17
commit
6d464e0bc4
2 changed files with 16 additions and 2 deletions
|
@ -202,9 +202,16 @@ class type_bool extends type_base
|
||||||
if ($profile_row['field_length'] == 1)
|
if ($profile_row['field_length'] == 1)
|
||||||
{
|
{
|
||||||
if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1))
|
if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1))
|
||||||
|
{
|
||||||
|
if ($preview_options)
|
||||||
{
|
{
|
||||||
$this->lang_helper->load_preview_options($profile_row['field_id'], $profile_row['lang_id'], $preview_options);
|
$this->lang_helper->load_preview_options($profile_row['field_id'], $profile_row['lang_id'], $preview_options);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->lang_helper->load_option_lang($profile_row['lang_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$options = $this->lang_helper->get($profile_row['field_id'], $profile_row['lang_id']);
|
$options = $this->lang_helper->get($profile_row['field_id'], $profile_row['lang_id']);
|
||||||
foreach ($options as $option_id => $option_value)
|
foreach ($options as $option_id => $option_value)
|
||||||
|
|
|
@ -198,9 +198,16 @@ class type_dropdown extends type_base
|
||||||
$value = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
|
$value = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
|
||||||
|
|
||||||
if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1))
|
if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1))
|
||||||
|
{
|
||||||
|
if ($preview_options)
|
||||||
{
|
{
|
||||||
$this->lang_helper->load_preview_options($profile_row['field_id'], $profile_row['lang_id'], $preview_options);
|
$this->lang_helper->load_preview_options($profile_row['field_id'], $profile_row['lang_id'], $preview_options);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->lang_helper->load_option_lang($profile_row['lang_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$profile_row['field_value'] = (int) $value;
|
$profile_row['field_value'] = (int) $value;
|
||||||
$this->template->assign_block_vars('dropdown', array_change_key_case($profile_row, CASE_UPPER));
|
$this->template->assign_block_vars('dropdown', array_change_key_case($profile_row, CASE_UPPER));
|
||||||
|
|
Loading…
Add table
Reference in a new issue