From 6d464e0bc44574687d5d9fce42d5a0515b7c9a01 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Fri, 27 Jun 2014 17:58:28 +0530 Subject: [PATCH] [ticket/12759] Fix type_bool and type_dropdown's UCP fields PHPBB3-12759 --- phpBB/phpbb/profilefields/type/type_bool.php | 9 ++++++++- phpBB/phpbb/profilefields/type/type_dropdown.php | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/profilefields/type/type_bool.php b/phpBB/phpbb/profilefields/type/type_bool.php index b9a7f93b85..f67e58ee3a 100644 --- a/phpBB/phpbb/profilefields/type/type_bool.php +++ b/phpBB/phpbb/profilefields/type/type_bool.php @@ -203,7 +203,14 @@ class type_bool extends type_base { if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1)) { - $this->lang_helper->load_preview_options($profile_row['field_id'], $profile_row['lang_id'], $preview_options); + if ($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']); diff --git a/phpBB/phpbb/profilefields/type/type_dropdown.php b/phpBB/phpbb/profilefields/type/type_dropdown.php index 7780f70d64..118ddf1f37 100644 --- a/phpBB/phpbb/profilefields/type/type_dropdown.php +++ b/phpBB/phpbb/profilefields/type/type_dropdown.php @@ -199,7 +199,14 @@ class type_dropdown extends type_base if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1)) { - $this->lang_helper->load_preview_options($profile_row['field_id'], $profile_row['lang_id'], $preview_options); + if ($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;