aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-27 17:58:28 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-27 17:58:28 +0530
commit6d464e0bc44574687d5d9fce42d5a0515b7c9a01 (patch)
tree276cb180a73dae9668f1587860eb72a405de63aa /phpBB/phpbb
parent98262a5a175727b2dacea283d2fec127a35ed819 (diff)
downloadforums-6d464e0bc44574687d5d9fce42d5a0515b7c9a01.tar
forums-6d464e0bc44574687d5d9fce42d5a0515b7c9a01.tar.gz
forums-6d464e0bc44574687d5d9fce42d5a0515b7c9a01.tar.bz2
forums-6d464e0bc44574687d5d9fce42d5a0515b7c9a01.tar.xz
forums-6d464e0bc44574687d5d9fce42d5a0515b7c9a01.zip
[ticket/12759] Fix type_bool and type_dropdown's UCP fields
PHPBB3-12759
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/profilefields/type/type_bool.php9
-rw-r--r--phpBB/phpbb/profilefields/type/type_dropdown.php9
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;