From 97f00c22ddc73aecc4244337f892cbe241b805dd Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 21 Feb 2021 19:03:13 -0600 Subject: [PATCH] change to week --- templates/themes/categories/theme.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php index 3081cf00..65c1c721 100644 --- a/templates/themes/categories/theme.php +++ b/templates/themes/categories/theme.php @@ -102,14 +102,12 @@ $HOUR = 3600; $DAY = $HOUR * 24; - $BIDAY = $DAY * 2; - $TRIDAY = $DAY * 3; + $WEEK = $DAY * 7; $stats = []; $hourly = []; $daily = []; - $bidaily = []; - $tridaily = []; + $weekly = []; foreach (array_merge(... $config['boards']) as $uri) { $_board = getBoardInfo($uri); @@ -122,8 +120,7 @@ $boardStat['hourly_ips'] = Categories::countUniqueIps($hourly, $HOUR, $_board); $boardStat['daily_ips'] = Categories::countUniqueIps($daily, $DAY, $_board); - $boardStat['bidaily_ips'] = Categories::countUniqueIps($bidaily, $BIDAY, $_board); - $boardStat['tridaily_ips'] = Categories::countUniqueIps($tridaily, $TRIDAY, $_board); + $boardStat['weekly_ips'] = Categories::countUniqueIps($weekly, $WEEK, $_board); $pph_query = query( sprintf("SELECT COUNT(*) AS count FROM ``posts_%s`` WHERE time > %d", @@ -138,8 +135,7 @@ $stats['hourly_ips'] = count($hourly); $stats['daily_ips'] = count($daily); - $stats['bidaily_ips'] = count($bidaily); - $stats['tridaily_ips'] = count($tridaily); + $stats['weekly_ips'] = count($weekly); $stats['pph'] = array_sum(array_column($stats['boards'], 'pph')); return $stats;