diff options
Diffstat (limited to 'phpBB/includes/mcp/mcp_notes.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_notes.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 7480b24a46..d07874524a 100644 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -193,9 +193,28 @@ class mcp_notes $sql_where = ($st) ? (time() - ($st * 86400)) : 0; $sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC'); + $log_operation = request_var('log_operation', ''); + $s_lang_keys = '<option value="">' . $user->lang['SHOW_ALL_OPERATIONS'] . '</option>'; + + $sql = "SELECT DISTINCT log_operation + FROM " . LOG_TABLE . ' + WHERE log_type = ' . LOG_USERS . + (($limit_days) ? " AND log_time >= $sql_where" : ''); + $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>'; + } + $db->sql_freeresult($result); + $log_data = array(); $log_count = 0; - view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort); + view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort, $log_operation); if ($log_count) { @@ -219,6 +238,7 @@ class mcp_notes 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, + 'S_LANG_KEYS' => $s_lang_keys, 'L_TITLE' => $user->lang['MCP_NOTES_USER'], |