Skip to content

Commit

Permalink
Fix user log filter (#5673)
Browse files Browse the repository at this point in the history
* fix filter - double get request due to redundant action variable

* remove obsolete condition
  • Loading branch information
xmacan authored Feb 20, 2024
1 parent 39e9585 commit 35a7247
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions user_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
set_default_action();

switch (get_request_var('action')) {
case 'view':
header('location: user_log.php');

break;
case 'clear':
clear_user_log();
raise_message('purge_user_log', __('User Log Purged.'), MESSAGE_LEVEL_INFO);
Expand Down Expand Up @@ -106,7 +102,7 @@ function view_user_log() {
?>
<script type='text/javascript'>
function clearFilter() {
strURL = urlPath+'user_log.php?action=view&clear=1';
strURL = urlPath+'user_log.php?clear=1';
loadUrl({url:strURL})
}

Expand Down Expand Up @@ -139,7 +135,6 @@ function applyFilter() {
strURL += '&result=' + $('#result').val();
strURL += '&rows=' + $('#rows').val();
strURL += '&filter=' + $('#filter').val();
strURL += '&action=view';
loadUrl({url:strURL})
}
</script>
Expand Down Expand Up @@ -274,7 +269,7 @@ function applyFilter() {

$user_log = db_fetch_assoc($user_log_sql);

$nav = html_nav_bar('user_log.php?action=view&username=' . get_request_var('username') . '&filter=' . get_request_var('filter'), MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 6, __('User Logins'), 'page', 'main');
$nav = html_nav_bar('user_log.php?username=' . get_request_var('username') . '&filter=' . get_request_var('filter'), MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 6, __('User Logins'), 'page', 'main');

print $nav;

Expand All @@ -289,7 +284,7 @@ function applyFilter() {
'ip' => array(__('IP Address'), 'DESC')
);

html_header_sort($display_text, get_request_var('sort_column'), get_request_var('sort_direction'), 1, 'user_log.php?action=view');
html_header_sort($display_text, get_request_var('sort_column'), get_request_var('sort_direction'), 1, 'user_log.php');

$i = 0;

Expand Down

0 comments on commit 35a7247

Please sign in to comment.