1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-02-22 06:17:44 +01:00

Interrupt the skipping of weeks without matches when a user has pending events

This commit is contained in:
gunnar_g 2008-11-20 23:58:21 +00:00
parent c7c73fab59
commit 415a9534c8
2 changed files with 17 additions and 1 deletions

View File

@ -448,11 +448,14 @@ start_week_round(void)
if(!query_start_end_season_end() &&
opt_int("int_opt_skip") &&
!query_user_games_this_week_round() &&
!query_user_events() &&
((week_round == 1 &&
!query_user_games_in_week_round(week - 1, fixture_get_last_week_round(week - 1))) ||
(week_round > 1 &&
!query_user_games_in_week_round(week, week_round - 1))))
!query_user_games_in_week_round(week, week_round - 1)))) {
user_event_show_next();
end_week_round();
}
else
{
cur_user = 0;

View File

@ -247,6 +247,19 @@ user_set_player_list_attributes(const User *user, PlayerListAttribute *attribute
}
}
/** Find out whether there are user events. */
gboolean
query_user_events()
{
gint i;
for(i=0;i<users->len;i++)
if(usr(i).events->len!=0)
return TRUE;
return FALSE;
}
/** Find out whether there are user games at the specified date. */
gboolean
query_user_games_in_week_round(gint week_number, gint week_round_number)