mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-26 09:44:26 +02:00
[ticket/17100] Refactor code to be more reusable
PHPBB3-17100
This commit is contained in:
@@ -330,7 +330,7 @@ class acp_bots
|
||||
}
|
||||
|
||||
$style_select = style_select($bot_row['bot_style'], true);
|
||||
phpbb_language_select($db, $template, $bot_row['bot_lang']);
|
||||
$lang_options = phpbb_language_select($db, $bot_row['bot_lang']);
|
||||
|
||||
$l_title = ($action == 'edit') ? 'EDIT' : 'ADD';
|
||||
|
||||
@@ -347,9 +347,13 @@ class acp_bots
|
||||
'S_EDIT_BOT' => true,
|
||||
'S_ACTIVE_OPTIONS' => $s_active_options,
|
||||
'S_STYLE_OPTIONS' => $style_select,
|
||||
'LANG_OPTIONS' => [
|
||||
'id' => 'bot_lang',
|
||||
'name' => 'bot_lang',
|
||||
'options' => $lang_options,
|
||||
],
|
||||
'S_ERROR' => (count($error)) ? true : false,
|
||||
)
|
||||
);
|
||||
));
|
||||
|
||||
return;
|
||||
|
||||
|
@@ -1796,7 +1796,7 @@ class acp_users
|
||||
}
|
||||
|
||||
phpbb_timezone_select($template, $user, $data['tz'], true);
|
||||
phpbb_language_select($db, $template, $data['lang']);
|
||||
$lang_options = phpbb_language_select($db, $data['lang']);
|
||||
|
||||
$user_prefs_data = array(
|
||||
'S_PREFS' => true,
|
||||
@@ -1833,6 +1833,11 @@ class acp_users
|
||||
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
|
||||
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
|
||||
|
||||
'LANG_OPTIONS' => [
|
||||
'id' => 'lang',
|
||||
'name' => 'lang',
|
||||
'options' => $lang_options,
|
||||
],
|
||||
'S_STYLE_OPTIONS' => style_select($data['style']),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user