mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/10990] Use $user->lang['COMMA_SEPARATOR'] when appropriate
PHPBB3-10990
This commit is contained in:
@@ -98,7 +98,7 @@ class acp_attachments
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((!empty($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode(', ', $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']';
|
||||
$l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((!empty($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode($user->lang['COMMA_SEPARATOR'], $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']';
|
||||
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_ATTACHMENT_SETTINGS',
|
||||
@@ -916,8 +916,8 @@ class acp_attachments
|
||||
WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_ATTACH_ORPHAN_DEL', implode(', ', $delete_files));
|
||||
$notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode(', ', $delete_files));
|
||||
add_log('admin', 'LOG_ATTACH_ORPHAN_DEL', implode($user->lang['COMMA_SEPARATOR'], $delete_files));
|
||||
$notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode($user->lang['COMMA_SEPARATOR'], $delete_files));
|
||||
}
|
||||
|
||||
$upload_list = array();
|
||||
@@ -1470,7 +1470,7 @@ class acp_attachments
|
||||
// Grab the list of entries
|
||||
$ips = request_var('ips', '');
|
||||
$ip_list = array_unique(explode("\n", $ips));
|
||||
$ip_list_log = implode(', ', $ip_list);
|
||||
$ip_list_log = implode($user->lang['COMMA_SEPARATOR'], $ip_list);
|
||||
|
||||
$ip_exclude = (int) $request->variable('ipexclude', false, false, phpbb_request_interface::POST);
|
||||
|
||||
|
@@ -123,7 +123,7 @@ class acp_bots
|
||||
|
||||
$cache->destroy('_bots');
|
||||
|
||||
add_log('admin', 'LOG_BOT_DELETE', implode(', ', $bot_name_ary));
|
||||
add_log('admin', 'LOG_BOT_DELETE', implode($user->lang['COMMA_SEPARATOR'], $bot_name_ary));
|
||||
trigger_error($user->lang['BOT_DELETED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
@@ -157,7 +157,7 @@ class acp_bots
|
||||
{
|
||||
$error[] = $user->lang['ERR_BOT_NO_MATCHES'];
|
||||
}
|
||||
|
||||
|
||||
if ($bot_row['bot_ip'] && !preg_match('#^[\d\.,:]+$#', $bot_row['bot_ip']))
|
||||
{
|
||||
if (!$ip_list = gethostbynamel($bot_row['bot_ip']))
|
||||
@@ -176,7 +176,7 @@ class acp_bots
|
||||
{
|
||||
$error[] = $user->lang['ERR_BOT_AGENT_MATCHES_UA'];
|
||||
}
|
||||
|
||||
|
||||
$bot_name = false;
|
||||
if ($bot_id)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ class acp_bots
|
||||
{
|
||||
$error[] = $user->lang['BOT_NAME_TAKEN'];
|
||||
}
|
||||
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
// New bot? Create a new user and group entry
|
||||
@@ -219,7 +219,7 @@ class acp_bots
|
||||
{
|
||||
trigger_error($user->lang['NO_BOT_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$user_id = user_add(array(
|
||||
'user_type' => (int) USER_IGNORE,
|
||||
@@ -233,7 +233,7 @@ class acp_bots
|
||||
'user_style' => (int) $bot_row['bot_style'],
|
||||
'user_allow_massemail' => 0,
|
||||
));
|
||||
|
||||
|
||||
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'user_id' => (int) $user_id,
|
||||
'bot_name' => (string) $bot_row['bot_name'],
|
||||
@@ -242,7 +242,7 @@ class acp_bots
|
||||
'bot_ip' => (string) $bot_row['bot_ip'])
|
||||
);
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$log = 'ADDED';
|
||||
}
|
||||
else if ($bot_id)
|
||||
@@ -289,12 +289,12 @@ class acp_bots
|
||||
|
||||
$log = 'UPDATED';
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('_bots');
|
||||
|
||||
|
||||
add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
|
||||
trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else if ($bot_id)
|
||||
@@ -335,11 +335,11 @@ class acp_bots
|
||||
'U_ACTION' => $this->u_action . "&id=$bot_id&action=$action",
|
||||
'U_BACK' => $this->u_action,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
|
||||
'BOT_NAME' => $bot_row['bot_name'],
|
||||
'BOT_IP' => $bot_row['bot_ip'],
|
||||
'BOT_AGENT' => $bot_row['bot_agent'],
|
||||
|
||||
|
||||
'S_EDIT_BOT' => true,
|
||||
'S_ACTIVE_OPTIONS' => $s_active_options,
|
||||
'S_STYLE_OPTIONS' => $style_select,
|
||||
@@ -397,7 +397,7 @@ class acp_bots
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate bot name against username table
|
||||
*/
|
||||
@@ -417,7 +417,7 @@ class acp_bots
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
return ($row) ? false : true;
|
||||
}
|
||||
}
|
||||
|
@@ -216,7 +216,7 @@ class acp_email
|
||||
if ($usernames)
|
||||
{
|
||||
$usernames = explode("\n", $usernames);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
|
||||
add_log('admin', 'LOG_MASS_EMAIL', implode($user->lang['COMMA_SEPARATOR'], utf8_normalize_nfc($usernames)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -289,8 +289,8 @@ class acp_inactive
|
||||
}
|
||||
|
||||
$base_url = $this->u_action . "&$u_sort_param&users_per_page=$per_page";
|
||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $inactive_count, $per_page, $start);
|
||||
|
||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $inactive_count, $per_page, $start);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_INACTIVE_USERS' => true,
|
||||
'S_INACTIVE_OPTIONS' => build_select($option_ary),
|
||||
@@ -299,7 +299,7 @@ class acp_inactive
|
||||
'S_SORT_KEY' => $s_sort_key,
|
||||
'S_SORT_DIR' => $s_sort_dir,
|
||||
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $inactive_count, $per_page, $start),
|
||||
|
||||
|
||||
'USERS_PER_PAGE' => $per_page,
|
||||
|
||||
'U_ACTION' => $this->u_action . "&$u_sort_param&users_per_page=$per_page&start=$start",
|
||||
|
@@ -497,7 +497,7 @@ class acp_permissions
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_FORUM_NAMES' => (sizeof($forum_names)) ? true : false,
|
||||
'FORUM_NAMES' => implode(', ', $forum_names))
|
||||
'FORUM_NAMES' => implode($user->lang['COMMA_SEPARATOR'], $forum_names))
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -79,7 +79,7 @@ class acp_prune
|
||||
$prune_posted = request_var('prune_days', 0);
|
||||
$prune_viewed = request_var('prune_vieweddays', 0);
|
||||
$prune_all = (!$prune_posted && !$prune_viewed) ? true : false;
|
||||
|
||||
|
||||
$prune_flags = 0;
|
||||
$prune_flags += (request_var('prune_old_polls', 0)) ? 2 : 0;
|
||||
$prune_flags += (request_var('prune_announce', 0)) ? 4 : 0;
|
||||
@@ -109,7 +109,7 @@ class acp_prune
|
||||
$p_result['topics'] = 0;
|
||||
$p_result['posts'] = 0;
|
||||
$log_data = '';
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
if (!$auth->acl_get('f_list', $row['forum_id']))
|
||||
@@ -129,7 +129,7 @@ class acp_prune
|
||||
$p_result['topics'] += $return['topics'];
|
||||
$p_result['posts'] += $return['posts'];
|
||||
}
|
||||
|
||||
|
||||
if ($prune_viewed)
|
||||
{
|
||||
$return = prune($row['forum_id'], 'viewed', $prunedate_viewed, $prune_flags, false);
|
||||
@@ -145,11 +145,11 @@ class acp_prune
|
||||
'NUM_TOPICS' => $p_result['topics'],
|
||||
'NUM_POSTS' => $p_result['posts'])
|
||||
);
|
||||
|
||||
|
||||
$log_data .= (($log_data != '') ? ', ' : '') . $row['forum_name'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
|
||||
// Sync all pruned forums at once
|
||||
sync('forum', 'forum_id', $prune_ids, true, true);
|
||||
add_log('admin', 'LOG_PRUNE', $log_data);
|
||||
@@ -259,7 +259,7 @@ class acp_prune
|
||||
{
|
||||
user_delete('remove', $user_id);
|
||||
}
|
||||
|
||||
|
||||
$l_log = 'LOG_PRUNE_USER_DEL_DEL';
|
||||
}
|
||||
else
|
||||
@@ -273,7 +273,7 @@ class acp_prune
|
||||
}
|
||||
}
|
||||
|
||||
add_log('admin', $l_log, implode(', ', $usernames));
|
||||
add_log('admin', $l_log, implode($user->lang['COMMA_SEPARATOR'], $usernames));
|
||||
$msg = $user->lang['USER_' . strtoupper($action) . '_SUCCESS'];
|
||||
}
|
||||
else
|
||||
@@ -345,7 +345,7 @@ class acp_prune
|
||||
{
|
||||
$s_find_join_time .= '<option value="' . $key . '">' . $value . '</option>';
|
||||
}
|
||||
|
||||
|
||||
$s_find_active_time = '';
|
||||
foreach ($find_time as $key => $value)
|
||||
{
|
||||
@@ -369,7 +369,7 @@ class acp_prune
|
||||
global $user, $db;
|
||||
|
||||
$users = utf8_normalize_nfc(request_var('users', '', true));
|
||||
|
||||
|
||||
if ($users)
|
||||
{
|
||||
$users = explode("\n", $users);
|
||||
@@ -409,7 +409,7 @@ class acp_prune
|
||||
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit = 0';
|
||||
}
|
||||
}
|
||||
else if (sizeof($active) && $active_select != 'lt')
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
|
||||
|
@@ -113,7 +113,7 @@ class acp_reasons
|
||||
$result = $db->sql_query($sql);
|
||||
$max_order = (int) $db->sql_fetchfield('max_reason_order');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$sql_ary = array(
|
||||
'reason_title' => (string) $reason_row['reason_title'],
|
||||
'reason_description' => (string) $reason_row['reason_description'],
|
||||
@@ -171,14 +171,14 @@ class acp_reasons
|
||||
'U_ACTION' => $this->u_action . "&id=$reason_id&action=$action",
|
||||
'U_BACK' => $this->u_action,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
|
||||
'REASON_TITLE' => $reason_row['reason_title'],
|
||||
'REASON_DESCRIPTION' => $reason_row['reason_description'],
|
||||
|
||||
'TRANSLATED_TITLE' => ($translated) ? $user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])] : '',
|
||||
'TRANSLATED_DESCRIPTION'=> ($translated) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])] : '',
|
||||
|
||||
'S_AVAILABLE_TITLES' => implode(', ', array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
|
||||
'S_AVAILABLE_TITLES' => implode($user->lang['COMMA_SEPARATOR'], array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
|
||||
'S_EDIT_REASON' => true,
|
||||
'S_TRANSLATED' => $translated,
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
@@ -303,7 +303,7 @@ class acp_reasons
|
||||
do
|
||||
{
|
||||
++$order;
|
||||
|
||||
|
||||
if ($row['reason_order'] != $order)
|
||||
{
|
||||
$sql = 'UPDATE ' . REPORTS_REASONS_TABLE . "
|
||||
|
@@ -1943,7 +1943,7 @@ class acp_users
|
||||
|
||||
$message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
|
||||
|
||||
add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode(', ', $log_attachments));
|
||||
add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode($user->lang['COMMA_SEPARATOR'], $log_attachments));
|
||||
trigger_error($message . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
else
|
||||
|
@@ -529,8 +529,8 @@ class auth_admin extends phpbb_auth
|
||||
'NAME' => $ug_name,
|
||||
'CATEGORIES' => implode('</th><th>', $categories),
|
||||
|
||||
'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode(', ', $user_groups_default[$ug_id]) : '',
|
||||
'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode(', ', $user_groups_custom[$ug_id]) : '',
|
||||
'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_default[$ug_id]) : '',
|
||||
'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_custom[$ug_id]) : '',
|
||||
'L_ACL_TYPE' => $l_acl_type,
|
||||
|
||||
'S_LOCAL' => ($local) ? true : false,
|
||||
|
Reference in New Issue
Block a user