From 32ce54a2aa7812bec21e27368247f5a57a1f0896 Mon Sep 17 00:00:00 2001 From: gyboth Date: Mon, 24 Nov 2008 12:09:06 +0000 Subject: [PATCH] Added omit_from_history property to leagues and cups. --- src/main.c | 3 +++ src/stat.c | 31 +++++++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/main.c b/src/main.c index b4072053..f662ad97 100644 --- a/src/main.c +++ b/src/main.c @@ -147,7 +147,10 @@ main_parse_cl_arguments(gint *argc, gchar ***argv) } if(deb_level != -1) + { option_set_int("int_debug", &constants, deb_level); + window_create(WINDOW_DEBUG); + } if(deb_writer != -1) option_set_int("int_debug_writer", &constants, deb_writer); diff --git a/src/stat.c b/src/stat.c index f8ced274..a52cc275 100644 --- a/src/stat.c +++ b/src/stat.c @@ -185,24 +185,31 @@ stat_create_season_stat(void) for(i=0;ilen;i++) { - for(j = 0; j < lig(i).tables->len; j++) + if(!query_league_cup_has_property(lig(i).id, "omit_from_history")) { - new_champ.cl_name = g_strdup(g_array_index(lig(i).tables, Table, j).name); - new_champ.team_name = - g_strdup(g_array_index(g_array_index(lig(i).tables, Table, j).elements, TableElement, 0).team->name); - g_array_append_val(new.league_champs, new_champ); - } + for(j = 0; j < lig(i).tables->len; j++) + { + new_champ.cl_name = g_strdup(g_array_index(lig(i).tables, Table, j).name); + new_champ.team_name = + g_strdup(g_array_index(g_array_index(lig(i).tables, Table, j).elements, TableElement, 0).team->name); + g_array_append_val(new.league_champs, new_champ); - g_array_append_val(new.league_stats, lig(i).stats); - lig(i).stats = stat_league_new(lig(i).name, lig(i).symbol); + } + + g_array_append_val(new.league_stats, lig(i).stats); + lig(i).stats = stat_league_new(lig(i).name, lig(i).symbol); + } } for(i=0;ilen;i++) { - new_champ.cl_name = g_strdup(acp(i)->name); - new_champ.team_name = - g_strdup(cup_get_winner(acp(i))->name); - g_array_append_val(new.cup_champs, new_champ); + if(!query_league_cup_has_property(acp(i)->id, "omit_from_history")) + { + new_champ.cl_name = g_strdup(acp(i)->name); + new_champ.team_name = + g_strdup(cup_get_winner(acp(i))->name); + g_array_append_val(new.cup_champs, new_champ); + } } g_array_append_val(season_stats, new);