diff options
author | Chris Smith <toonarmy@phpbb.com> | 2009-07-26 14:54:02 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2009-07-26 14:54:02 +0000 |
commit | 68e2102f20fa583dd184cefec19511d61caa5602 (patch) | |
tree | 9c4beb8ae2f350f58369c7dd05ad1f691084ccb7 /phpBB/includes/mcp/mcp_logs.php | |
parent | 1a0bd316e41ba78b8519558c47665877e8661970 (diff) | |
download | forums-68e2102f20fa583dd184cefec19511d61caa5602.tar forums-68e2102f20fa583dd184cefec19511d61caa5602.tar.gz forums-68e2102f20fa583dd184cefec19511d61caa5602.tar.bz2 forums-68e2102f20fa583dd184cefec19511d61caa5602.tar.xz forums-68e2102f20fa583dd184cefec19511d61caa5602.zip |
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
Diffstat (limited to 'phpBB/includes/mcp/mcp_logs.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_logs.php | 20 |
1 files changed, 19 insertions, 1 deletions
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 .= '<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); |