diff --git a/CHANGELOG.md b/CHANGELOG.md index 323fde0d..85343509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Merged pull requests:** - Release v2.1.5-2023.09 🎉 +- Added missing EXCLUDED_USERS_CSV in tr_stats.php [\#283](https://github.com/torrentpier/torrentpier-lts/pull/283) ([belomaxorka](https://github.com/belomaxorka)) - Added support 7z archives [\#282](https://github.com/torrentpier/torrentpier-lts/pull/282) ([belomaxorka](https://github.com/belomaxorka)) - Added support bmp images in BBCode [\#279](https://github.com/torrentpier/torrentpier-lts/pull/279) ([belomaxorka](https://github.com/belomaxorka)) - Added support webp images in BBCode [\#278](https://github.com/torrentpier/torrentpier-lts/pull/278) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/admin/stats/tr_stats.php b/admin/stats/tr_stats.php index 4655acff..d24b8e5a 100644 --- a/admin/stats/tr_stats.php +++ b/admin/stats/tr_stats.php @@ -8,8 +8,8 @@ $user->session_start(); if (!IS_ADMIN) bb_die($lang['NOT_AUTHORISED']); -$sql[] = 'SELECT count(*) FROM `'.BB_USERS.'` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-2592000'; -$sql[] = 'SELECT count(*) FROM `'.BB_USERS.'` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-7776000'; +$sql[] = 'SELECT count(*) FROM `'.BB_USERS.'` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-2592000 AND user_id NOT IN ('.EXCLUDED_USERS_CSV.')'; +$sql[] = 'SELECT count(*) FROM `'.BB_USERS.'` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-7776000 AND user_id NOT IN ('.EXCLUDED_USERS_CSV.')'; $sql[] = 'SELECT round(avg(size)/1048576) FROM `'.BB_BT_TORRENTS.'`'; $sql[] = 'SELECT count(*) FROM `'.BB_BT_TORRENTS.'`'; $sql[] = 'SELECT count(distinct(topic_id)) FROM `'.BB_BT_TRACKER_SNAP.'` WHERE seeders > 0'; @@ -45,4 +45,4 @@ if ($l = sys('la')) echo 'gen time: '. sprintf('%.3f', (array_sum(explode(' ', microtime())) - TIMESTART)) ." sec\n"; echo ''; -echo ''; \ No newline at end of file +echo '';