mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Make some adjustments to the log filter. r9781, r9800
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9858 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1a0bd316e4
commit
68e2102f20
3 changed files with 40 additions and 2 deletions
|
@ -156,14 +156,32 @@ class acp_logs
|
|||
" . (($limit_days) ? "AND log_time >= $sql_where " : ' ') .
|
||||
$sql_forum;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (empty($row['log_operation']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
|
||||
$s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . htmlspecialchars(strip_tags($user->lang[$row['log_operation']]), ENT_COMPAT, 'UTF-8') . '</option>';
|
||||
|
||||
if (isset($user->lang[$row['log_operation']]))
|
||||
{
|
||||
$text = htmlspecialchars(strip_tags(str_replace('<br />', ' ', $user->lang[$row['log_operation']])), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Fill in sprintf placeholders with translated placeholder text
|
||||
if (substr_count($text, '%'))
|
||||
{
|
||||
$text = vsprintf($text, array_fill(0, substr_count($text, '%'), $user->lang['LOGS_PLACEHOLDER']));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = ucfirst(str_replace('_', ' ', strtolower($row['log_operation'])));
|
||||
}
|
||||
|
||||
$s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . $text . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
|
|
@ -186,14 +186,32 @@ class mcp_logs
|
|||
' . (($limit_days) ? "AND log_time >= $sql_where " : ' ') .
|
||||
$sql_forum;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (empty($row['log_operation']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
|
||||
$s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . htmlspecialchars(strip_tags($user->lang[$row['log_operation']]), ENT_COMPAT, 'UTF-8') . '</option>';
|
||||
|
||||
if (isset($user->lang[$row['log_operation']]))
|
||||
{
|
||||
$text = htmlspecialchars(strip_tags(str_replace('<br />', ' ', $user->lang[$row['log_operation']])), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Fill in sprintf placeholders with translated placeholder text
|
||||
if (substr_count($text, '%'))
|
||||
{
|
||||
$text = vsprintf($text, array_fill(0, substr_count($text, '%'), $user->lang['LOGS_PLACEHOLDER']));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = ucfirst(str_replace('_', ' ', strtolower($row['log_operation'])));
|
||||
}
|
||||
|
||||
$s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . $text . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
|
|
@ -307,6 +307,8 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'DISPLAY_LOG' => 'Display entries from previous',
|
||||
|
||||
'LOGS_PLACEHOLDER' => '<value>',
|
||||
|
||||
'NO_ENTRIES' => 'No log entries for this period.',
|
||||
|
||||
'SORT_IP' => 'IP address',
|
||||
|
|
Loading…
Add table
Reference in a new issue