Skip to content

Commit e52100d

Browse files
author
Kristan Kenney
committed
Set correct view on Statistics page when impersonating user
1 parent c39103a commit e52100d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

web/list/stats/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
77

88
// Data
9-
if ($_SESSION['userContext'] === 'admin') {
9+
if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) {
1010
if (empty($_GET['user'])) {
1111
exec (HESTIA_CMD."v-list-users-stats json", $output, $return_var);
1212
$data = json_decode(implode('', $output), true);

web/templates/admin/list_stats.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<div class="l-center">
22
<div class="l-sort clearfix noselect">
33
<div class="l-unit-toolbar__buttonstrip">
4+
<? if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) { ?>
45
<a class="ui-button cancel" href='/list/stats/'><i class="fas fa-info-circle status-icon lightblue"></i> <?=_('Overall Statistics')?></a>
6+
<? } else {?>
7+
<a class="ui-button cancel" href='/list/stats/'><i class="fas fa-redo status-icon green"></i> <?=_('Refresh')?></a>
8+
<? } ?>
59
</div>
610
<div class="l-sort-toolbar clearfix">
711
<table>

0 commit comments

Comments
 (0)