1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

[ticket/16790] Remove unused code

PHPBB3-16790
This commit is contained in:
rubencm
2021-06-05 01:42:01 +02:00
committed by Ruben Calvo
parent 072d62b0c0
commit 2f41ce219c
22 changed files with 51 additions and 197 deletions

View File

@@ -344,10 +344,10 @@ class acp_profile
$s_hidden_fields = '<input type="hidden" name="field_id" value="' . $field_id . '" />';
}
else
else // action = create
{
// We are adding a new field, define basic params
$lang_options = $field_row = array();
$lang_options = array();
$field_type = $request->variable('field_type', '');
@@ -475,41 +475,6 @@ class acp_profile
$cp->vars[$key] = $var;
}
// step 3 - all arrays
if ($action == 'edit')
{
// Get language entries
$sql = 'SELECT *
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE lang_id <> ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY option_id ASC";
$result = $db->sql_query($sql);
$l_lang_options = array();
while ($row = $db->sql_fetchrow($result))
{
$l_lang_options[$row['lang_id']][$row['option_id']] = $row['lang_value'];
}
$db->sql_freeresult($result);
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
FROM ' . PROFILE_LANG_TABLE . '
WHERE lang_id <> ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY lang_id ASC";
$result = $db->sql_query($sql);
$l_lang_name = $l_lang_explain = $l_lang_default_value = array();
while ($row = $db->sql_fetchrow($result))
{
$l_lang_name[$row['lang_id']] = $row['lang_name'];
$l_lang_explain[$row['lang_id']] = $row['lang_explain'];
$l_lang_default_value[$row['lang_id']] = $row['lang_default_value'];
}
$db->sql_freeresult($result);
}
foreach ($exclude[3] as $key)
{
$cp->vars[$key] = $request->variable($key, array(0 => ''), true);
@@ -670,7 +635,7 @@ class acp_profile
// Build options based on profile type
$options = $profile_field->get_options($this->lang_defs['iso'][$config['default_lang']], $cp->vars);
foreach ($options as $num => $option_ary)
foreach ($options as $option_ary)
{
$template->assign_block_vars('option', $option_ary);
}