From 1db9ddcb537342813689b30c496c171a684fc953 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 8 Sep 2023 23:34:37 +0300 Subject: [PATCH] improve this connection search UI --- src/public/index.php | 2 +- src/public/peer.php | 2 +- src/public/search.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/public/index.php b/src/public/index.php index ab6600b..06fef9a 100644 --- a/src/public/index.php +++ b/src/public/index.php @@ -182,7 +182,7 @@ $peers = $memory->getByMethodCallback(
- +
diff --git a/src/public/peer.php b/src/public/peer.php index 4d1f55e..8959bf4 100644 --- a/src/public/peer.php +++ b/src/public/peer.php @@ -212,7 +212,7 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId);
- +
diff --git a/src/public/search.php b/src/public/search.php index 97cd2ee..cef48ca 100644 --- a/src/public/search.php +++ b/src/public/search.php @@ -42,12 +42,12 @@ try { } // Filter request data -$requestQuery = !empty($_GET['query']) ? trim(html_entity_decode(urldecode($_GET['query']))) : '*'; +$requestQuery = !empty($_GET['query']) ? trim(html_entity_decode(urldecode($_GET['query']))) : 'this'; $requestTheme = !empty($_GET['theme']) && in_array(['default'], $_GET['theme']) ? $_GET['theme'] : 'default'; $requestPage = !empty($_GET['page']) && $_GET['page'] > 1 ? (int) $_GET['page'] : 1; // Redirect visitor to it peer page on empty search request -if ($requestQuery == '*' && !empty($_SERVER['REMOTE_ADDR'])) { +if ($requestQuery == 'this' && !empty($_SERVER['REMOTE_ADDR'])) { if (filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) || filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { @@ -85,7 +85,7 @@ $results = $sphinx->searchPeers($requestQuery,
- +
@@ -96,7 +96,7 @@ $results = $sphinx->searchPeers($requestQuery,
-

+