From 7e4eb2599a739673925ec31aef41cd9a90bd4059 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 13 Aug 2023 21:16:31 +0300 Subject: [PATCH] fix time request --- src/public/index.php | 2 +- src/public/peer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/index.php b/src/public/index.php index e78cc83..ea1e71b 100644 --- a/src/public/index.php +++ b/src/public/index.php @@ -31,7 +31,7 @@ try { // Prepare request $requestTheme = isset($_GET['theme']) && in_array(['default'], $_GET['theme']) ? $_GET['theme'] : 'default'; -$requestTime = !empty($_GET['time']) ? (int) $requestTime : time(); +$requestTime = !empty($_GET['time']) ? (int) $_GET['time'] : time(); $requestSort = !empty($_GET['sort']) && in_array($_GET['sort'], ['timeOnline', 'uptimeAvg', 'sentSum', 'receivedSum', 'address']) ? $_GET['sort'] : 'timeOnline'; $requestOrder = !empty($_GET['order']) && in_array($_GET['order'], ['ASC', 'DESC']) ? $_GET['order'] : 'DESC'; $requestPage = !empty($_GET['page']) && $_GET['page'] > 1 ? (int) $_GET['page'] : 1; diff --git a/src/public/peer.php b/src/public/peer.php index b6136e7..49e1c9e 100644 --- a/src/public/peer.php +++ b/src/public/peer.php @@ -33,7 +33,7 @@ try { $requestPeerId = isset($_GET['peerId']) ? (int) $_GET['peerId'] : 0; $requestTheme = !empty($_GET['theme']) && in_array(['default'], $_GET['theme']) ? $_GET['theme'] : 'default'; -$requestTime = !empty($_GET['time']) ? (int) $requestTime : time(); +$requestTime = !empty($_GET['time']) ? (int) $_GET['time'] : time(); $requestSort = !empty($_GET['sort']) && in_array($_GET['sort'], ['peerConnection.timeAdded']) ? $_GET['sort'] : 'peerConnection.timeAdded'; $requestOrder = !empty($_GET['order']) && in_array($_GET['order'], ['ASC', 'DESC']) ? $_GET['order'] : 'DESC'; $requestPage = !empty($_GET['page']) && $_GET['page'] > 1 ? (int) $_GET['page'] : 1;