From 6fbfebf300fcc92f349db18da05f748c4d355d21 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 6 Sep 2026 14:06:51 -1000 Subject: Fold `enable-stats` back into `max-stats` A `max-stats` period enables the page again, as it did before v2.2.0, so one key does both jobs. --- source/ui-stats.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/ui-stats.c') diff --git a/source/ui-stats.c b/source/ui-stats.c index 134e4c2..97918e0 100644 --- a/source/ui-stats.c +++ b/source/ui-stats.c @@ -382,9 +382,8 @@ static void print_options_form(const struct cgit_period *period, int top) html("
"); cgit_add_hidden_formfields(1, 0, "stats"); html("\n"); - if (!ctx.repo->max_stats || ctx.repo->max_stats > 1) { - choices = ctx.repo->max_stats ? - ctx.repo->max_stats : (int)ARRAY_SIZE(periods); + if (ctx.repo->max_stats > 1) { + choices = ctx.repo->max_stats; html(""); html("
Period: