Fixed leaderboard bug

Fixed bug where disabling server-wide shows broke the leaderboard. The leaderboard setting AND server-wide show setting had to be enabled for leaderboards to work.
This commit is contained in:
aunefyren 2021-12-02 15:41:12 +01:00
parent 104b4c9760
commit 7556dd9ab5

View file

@ -1026,7 +1026,7 @@ function data_get_user_stats_loop($id, $array) {
}
// Choose return value based on if function is enabled
if(($config->get_year_stats_shows || $config->get_year_stats_shows || $config->get_year_stats_shows) && $config->get_year_stats_leaderboard) {
if(($config->get_year_stats_movies || $config->get_year_stats_shows || $config->get_year_stats_music) && $config->get_year_stats_leaderboard) {
$return_year_users = array_slice($year_users, 0, 10);
} else {
$return_year_users = array();