mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-23 06:47:56 +01:00
Interrupt the skipping of weeks without matches when a user has pending events
This commit is contained in:
parent
c7c73fab59
commit
415a9534c8
@ -448,11 +448,14 @@ start_week_round(void)
|
|||||||
if(!query_start_end_season_end() &&
|
if(!query_start_end_season_end() &&
|
||||||
opt_int("int_opt_skip") &&
|
opt_int("int_opt_skip") &&
|
||||||
!query_user_games_this_week_round() &&
|
!query_user_games_this_week_round() &&
|
||||||
|
!query_user_events() &&
|
||||||
((week_round == 1 &&
|
((week_round == 1 &&
|
||||||
!query_user_games_in_week_round(week - 1, fixture_get_last_week_round(week - 1))) ||
|
!query_user_games_in_week_round(week - 1, fixture_get_last_week_round(week - 1))) ||
|
||||||
(week_round > 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();
|
end_week_round();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cur_user = 0;
|
cur_user = 0;
|
||||||
|
13
src/user.c
13
src/user.c
@ -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. */
|
/** Find out whether there are user games at the specified date. */
|
||||||
gboolean
|
gboolean
|
||||||
query_user_games_in_week_round(gint week_number, gint week_round_number)
|
query_user_games_in_week_round(gint week_number, gint week_round_number)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user