Browse Source

show remote address to owner and user from ADMIN_REMOTE_ADDRESS_WHITELIST

yggdrasil-0.4.7
ghost 1 year ago
parent
commit
b5a26a9eb2
  1. 6
      src/public/peer.php

6
src/public/peer.php

@ -253,7 +253,7 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId);
<?php echo _('Time') ?> <?php echo _('Time') ?>
</a> </a>
</th> </th>
<?php if (Access::address([$peerInfo->address])) { ?> <?php if (Access::address(array_merge([$peerInfo->address], ADMIN_REMOTE_ADDRESS_WHITELIST))) { ?>
<th class="text-left"> <th class="text-left">
<?php echo _('Remote') ?> <?php echo _('Remote') ?>
<sub title="<?php echo _('Feature visible for this connection only') ?>"> <sub title="<?php echo _('Feature visible for this connection only') ?>">
@ -281,7 +281,7 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId);
<?php foreach ($peerRemoteConnections as $i => $peerRemoteConnection) { ?> <?php foreach ($peerRemoteConnections as $i => $peerRemoteConnection) { ?>
<tr> <tr>
<td class="text-left no-wrap"><?php echo date('Y-m-d H:s:i', $peerRemoteConnection->timeAdded) ?></td> <td class="text-left no-wrap"><?php echo date('Y-m-d H:s:i', $peerRemoteConnection->timeAdded) ?></td>
<?php if (Access::address([$peerInfo->address])) { ?> <?php if (Access::address(array_merge([$peerInfo->address], ADMIN_REMOTE_ADDRESS_WHITELIST))) { ?>
<td class="text-left"> <td class="text-left">
<?php echo $peerRemoteConnection->remote ?> <?php echo $peerRemoteConnection->remote ?>
</td> </td>
@ -304,7 +304,7 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId);
<?php if ($i >= WEBSITE_PEER_REMOTE_PAGINATION_LIMIT) { ?> <?php if ($i >= WEBSITE_PEER_REMOTE_PAGINATION_LIMIT) { ?>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="6" class="text-left"> <td colspan="<?php echo Access::address(array_merge([$peerInfo->address], ADMIN_REMOTE_ADDRESS_WHITELIST)) ? 6 : 5 ?>" class="text-left">
<?php if ($requestPage > 1) { ?> <?php if ($requestPage > 1) { ?>
<a href="<?php echo WEBSITE_URL ?>/peer.php?peerId=<?php echo $requestPeerId ?>&sort=<?php echo $requestSort ?>&page=<?php echo $requestPage - 1 ?>"><?php echo _('&larr;') ?></a> <a href="<?php echo WEBSITE_URL ?>/peer.php?peerId=<?php echo $requestPeerId ?>&sort=<?php echo $requestSort ?>&page=<?php echo $requestPage - 1 ?>"><?php echo _('&larr;') ?></a>
<?php } ?> <?php } ?>

Loading…
Cancel
Save