diff options
context:
space:
mode:
Diffstat (limited to 'source/cmd.c')
-rw-r--r--source/cmd.c5
1 file changed, 4 insertions, 1 deletion
diff --git a/source/cmd.c b/source/cmd.c
index a8768eb..84a9d33 100644
--- a/source/cmd.c
+++ b/source/cmd.c
@@ -162,7 +162,10 @@ static void snapshot_fn(void)
static void stats_fn(void)
{
- cgit_show_stats();
+ if (ctx.repo->enable_stats)
+ cgit_show_stats();
+ else
+ cgit_print_error_page(404, "Not found", "Stats are disabled");
}
static void summary_fn(void)