aboutsummaryrefslogtreecommitdiff
path: root/mod/logbrowser/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/logbrowser/views')
-rw-r--r--mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php12
-rw-r--r--mod/logbrowser/views/default/logbrowser/refine.php7
2 files changed, 12 insertions, 7 deletions
diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
index 2be1f33dc..a04ef686a 100644
--- a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
+++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
@@ -13,14 +13,14 @@ $offset = get_input('offset');
$search_username = get_input('search_username');
if ($search_username) {
if ($user = get_user_by_username($search_username)) {
- $user = $user->guid;
+ $user_guid = $user->guid;
}
} else {
$user_guid = get_input('user_guid',0);
if ($user_guid) {
- $user = (int) $user_guid;
+ $user_guid = (int) $user_guid;
} else {
- $user = "";
+ $user_guid = null;
}
}
@@ -35,14 +35,14 @@ if ($timeupper) {
}
$refine = elgg_view('logbrowser/refine', array(
- 'user_guid' => $user,
+ 'user_guid' => $user_guid,
'timeupper' => $timeupper,
'timelower' => $timelower,
));
// Get log entries
-$log = get_system_log($user, "", "", "","", $limit, $offset, false, $timeupper, $timelower);
-$count = get_system_log($user, "", "", "","", $limit, $offset, true, $timeupper, $timelower);
+$log = get_system_log($user_guid, "", "", "","", $limit, $offset, false, $timeupper, $timelower);
+$count = get_system_log($user_guid, "", "", "","", $limit, $offset, true, $timeupper, $timelower);
$table = elgg_view('logbrowser/table', array('log_entries' => $log));
diff --git a/mod/logbrowser/views/default/logbrowser/refine.php b/mod/logbrowser/views/default/logbrowser/refine.php
index 27cb6042f..86460c79e 100644
--- a/mod/logbrowser/views/default/logbrowser/refine.php
+++ b/mod/logbrowser/views/default/logbrowser/refine.php
@@ -18,13 +18,18 @@ $toggle_link = elgg_view('output/url', array(
'rel' => 'toggle',
));
+$form_class = 'elgg-module elgg-module-inline';
+if (!isset($vars['user_guid'])) {
+ $form_class .= ' hidden';
+}
+
?>
<div id="logbrowser-search-area" class="mbm">
<div>
<?php echo $toggle_link; ?>
</div>
- <div id="log-browser-search-form" class="elgg-module elgg-module-inline hidden">
+ <div id="log-browser-search-form" class="<?php echo $form_class; ?>">
<div class="elgg-head">
<h3><?php echo elgg_echo('logbrowser:search'); ?></h3>
</div>