aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-11-13 00:14:54 +0100
committerMarc Alexander <admin@m-a-styles.de>2014-11-13 00:14:54 +0100
commit2f54ab0a24a6ee036ab8ba3edeef3d8891864be6 (patch)
tree0858cac3c4b204feafef1691ed94b0927a19824c
parenta520edb8fa917ef86c1bc52525632ecb2392042a (diff)
parentec220d64946e9fc50df6645087a38c8852625af0 (diff)
downloadforums-2f54ab0a24a6ee036ab8ba3edeef3d8891864be6.tar
forums-2f54ab0a24a6ee036ab8ba3edeef3d8891864be6.tar.gz
forums-2f54ab0a24a6ee036ab8ba3edeef3d8891864be6.tar.bz2
forums-2f54ab0a24a6ee036ab8ba3edeef3d8891864be6.tar.xz
forums-2f54ab0a24a6ee036ab8ba3edeef3d8891864be6.zip
Merge pull request #3137 from prototech/ticket/13209
[ticket/13209] Fix loss of CPF language field values when switching steps
-rw-r--r--phpBB/phpbb/profilefields/type/type_base.php14
-rw-r--r--phpBB/phpbb/profilefields/type/type_bool.php2
2 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php
index 52f5d15511..9b4bada26d 100644
--- a/phpBB/phpbb/profilefields/type/type_base.php
+++ b/phpBB/phpbb/profilefields/type/type_base.php
@@ -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);
}
}
diff --git a/phpBB/phpbb/profilefields/type/type_bool.php b/phpBB/phpbb/profilefields/type/type_bool.php
index 0582722833..75934e3be7 100644
--- a/phpBB/phpbb/profilefields/type/type_bool.php
+++ b/phpBB/phpbb/profilefields/type/type_bool.php
@@ -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);