aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_profile.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-06-08 15:12:03 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-06-08 15:12:03 +0000
commit7a5bb1c074bf0ead17902d296986b895f7adba16 (patch)
tree193601bca51a7678d0523881a1f80072cb5e218f /phpBB/includes/acp/acp_profile.php
parentfb89a2d85ed7ace54999df2b2a5dab9d9510911b (diff)
downloadforums-7a5bb1c074bf0ead17902d296986b895f7adba16.tar
forums-7a5bb1c074bf0ead17902d296986b895f7adba16.tar.gz
forums-7a5bb1c074bf0ead17902d296986b895f7adba16.tar.bz2
forums-7a5bb1c074bf0ead17902d296986b895f7adba16.tar.xz
forums-7a5bb1c074bf0ead17902d296986b895f7adba16.zip
Inserting lots of ugly to code to introduce CFPs to the new dimension-aware request_var. I hope I got all of the nasty critters spawned by it.
#11803 git-svn-id: file:///svn/phpbb/trunk@7730 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_profile.php')
-rw-r--r--phpBB/includes/acp/acp_profile.php22
1 files changed, 19 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index ccd3dbf40d..82b14b2a3d 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -540,12 +540,17 @@ class acp_profile
{
$cp->vars[$key] = $$key;
}
- else if ($key == 'l_lang_options' && sizeof($cp->vars[$key]) > 1)
+ else if ($key == 'l_lang_options' && $field_type == FIELD_BOOL)
+ {
+ $cp->vars[$key] = request_var($key, array(0 => array('')), true);
+ }
+ else if ($key == 'l_lang_options' && is_array($cp->vars[$key]))
{
foreach ($cp->vars[$key] as $lang_id => $options)
{
$cp->vars[$key][$lang_id] = explode("\n", $options);
}
+
}
}
@@ -626,6 +631,11 @@ class acp_profile
$cp->vars['columns'] = request_var('columns', 0);
$_new_key_ary[$key] = $cp->vars['rows'] . '|' . $cp->vars['columns'];
}
+ if ($field_type == FIELD_BOOL && $key == 'l_lang_options' && isset($_REQUEST['l_lang_options']))
+ {
+ $_new_key_ary[$key] = request_var($key, array(array('')), true);
+
+ }
else
{
if (!isset($_REQUEST[$key]))
@@ -1080,8 +1090,14 @@ class acp_profile
$cp->vars['l_lang_name'] = request_var('l_lang_name', array(0 => ''), true);
$cp->vars['l_lang_explain'] = request_var('l_lang_explain', array(0 => ''), true);
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => ''), true);
- $cp->vars['l_lang_options'] = request_var('l_lang_options', array(0 => ''), true);
-
+ if ($field_type != FIELD_BOOL)
+ {
+ $cp->vars['l_lang_options'] = request_var('l_lang_options', array(0 => ''), true);
+ }
+ else
+ {
+ $cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => array('')), true);
+ }
if ($cp->vars['lang_options'])
{
if (!is_array($cp->vars['lang_options']))