From 68e2102f20fa583dd184cefec19511d61caa5602 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 26 Jul 2009 14:54:02 +0000 Subject: 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 --- phpBB/includes/mcp/mcp_logs.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/mcp/mcp_logs.php') diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php index b83e364811..db22259ec4 100644 --- a/phpBB/includes/mcp/mcp_logs.php +++ b/phpBB/includes/mcp/mcp_logs.php @@ -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 .= ''; + + if (isset($user->lang[$row['log_operation']])) + { + $text = htmlspecialchars(strip_tags(str_replace('
', ' ', $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 .= ''; } $db->sql_freeresult($result); -- cgit v1.2.1