From 61bc345d16a51c44078d684032ec50bb16b2bc47 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 16 Jun 2012 17:36:56 -0400 Subject: Fixes #4586 properly accessing ip address in refine form --- .../views/default/admin/administer_utilities/logbrowser.php | 1 + mod/logbrowser/views/default/forms/logbrowser/refine.php | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php index 89894e3d2..2581f954c 100644 --- a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php +++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php @@ -41,6 +41,7 @@ $refine = elgg_view('logbrowser/refine', array( 'user_guid' => $user_guid, 'timeupper' => $timeupper, 'timelower' => $timelower, + 'ip_address' => $ip_address, )); // Get log entries diff --git a/mod/logbrowser/views/default/forms/logbrowser/refine.php b/mod/logbrowser/views/default/forms/logbrowser/refine.php index 6ec5907b6..3c6528d21 100644 --- a/mod/logbrowser/views/default/forms/logbrowser/refine.php +++ b/mod/logbrowser/views/default/forms/logbrowser/refine.php @@ -6,15 +6,16 @@ * @uses $vars['user_guid'] * @uses $vars['timelower'] * @uses $vars['timeupper'] + * @uses $vars['ip_address'] */ if (isset($vars['timelower'])) { - $lowerval = date('r',$vars['timelower']); + $lowerval = date('r', $vars['timelower']); } else { $lowerval = ""; } if (isset($vars['timeupper'])) { - $upperval = date('r',$vars['timeupper']); + $upperval = date('r', $vars['timeupper']); } else { $upperval = ""; } @@ -26,7 +27,7 @@ if (isset($vars['user_guid'])) { } else { $userval = ""; } -$ip_address = elgg_extract('ip_address', ''); +$ip_address = elgg_extract('ip_address', $vars); $form = "
" . elgg_echo('logbrowser:user'); $form .= elgg_view('input/text', array( -- cgit v1.2.3