diff options
author | Sem <sembrestels@riseup.net> | 2012-07-01 23:20:47 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-01 23:20:47 +0200 |
commit | 671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2 (patch) | |
tree | 436b0de846650bce13436b51a2d5214224f8898c /mod/logbrowser/views/default/admin | |
parent | 3da3f2aa28a42c23bdc9d661e7e13fd6f2bd2b10 (diff) | |
parent | b91d8bb0fea5cef9fafea72181a0007cfaa54725 (diff) | |
download | elgg-671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2.tar.gz elgg-671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2.tar.bz2 |
Upgraded to Elgg 1.8.6.
Merge tag '1.8.6' of git://github.com/Elgg/Elgg into lorea-preprod
Elgg 1.8.6 release
Diffstat (limited to 'mod/logbrowser/views/default/admin')
-rw-r--r-- | mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php index 89894e3d2..9506c9d9f 100644 --- a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php +++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php @@ -15,11 +15,17 @@ if ($search_username) { $user = get_user_by_username($search_username); if ($user) { $user_guid = $user->guid; + } else { + $user_guid = null; } } else { $user_guid = get_input('user_guid', null); if ($user_guid) { $user_guid = (int) $user_guid; + $user = get_entity($user_guid); + if ($user) { + $search_username = $user->username; + } } else { $user_guid = null; } @@ -38,9 +44,10 @@ if ($timeupper) { $ip_address = get_input('ip_address'); $refine = elgg_view('logbrowser/refine', array( - 'user_guid' => $user_guid, 'timeupper' => $timeupper, 'timelower' => $timelower, + 'ip_address' => $ip_address, + 'username' => $search_username, )); // Get log entries @@ -49,6 +56,12 @@ $log = get_system_log($user_guid, "", "", "","", $limit, $offset, false, $timeup $count = get_system_log($user_guid, "", "", "","", $limit, $offset, true, $timeupper, $timelower, 0, $ip_address); +// if user does not exist, we have no results +if ($search_username && is_null($user_guid)) { + $log = false; + $count = 0; +} + $table = elgg_view('logbrowser/table', array('log_entries' => $log)); $nav = elgg_view('navigation/pagination',array( |