From c7c76cf221e8bcda5f6491ef9935ed9a7378088a Mon Sep 17 00:00:00 2001 From: tuscanhobbit Date: Wed, 8 Oct 2014 18:56:42 +0200 Subject: The simplest way to hide hubs in statistics --- mod/siteinfo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/siteinfo.php b/mod/siteinfo.php index de55c69cf..ef0dde065 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -74,7 +74,8 @@ function siteinfo_init(&$a) { 'channels_total' => $channels_total_stat, 'channels_active_halfyear' => $channels_active_halfyear_stat, 'channels_active_monthly' => $channels_active_monthly_stat, - 'local_posts' => $local_posts_stat + 'local_posts' => $local_posts_stat, + 'hide_in_statistics' => get_config('system','hide_in_statistics') ); json_return_and_die($data); } -- cgit v1.2.3 From 9edaa2843b9982f52fb1ed93b1c6e3d9e53921d7 Mon Sep 17 00:00:00 2001 From: tuscanhobbit Date: Wed, 8 Oct 2014 19:03:07 +0200 Subject: it's probably better to return an int type in json --- mod/siteinfo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/siteinfo.php b/mod/siteinfo.php index ef0dde065..c1d65fadd 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -55,6 +55,7 @@ function siteinfo_init(&$a) { $channels_active_halfyear_stat = intval(get_config('system','channels_active_halfyear_stat')); $channels_active_monthly_stat = intval(get_config('system','channels_active_monthly_stat')); $local_posts_stat = intval(get_config('system','local_posts_stat')); + $hide_in_statistics = intval(get_config('system','hide_in_statistics')); $data = Array( 'version' => RED_VERSION, @@ -75,7 +76,7 @@ function siteinfo_init(&$a) { 'channels_active_halfyear' => $channels_active_halfyear_stat, 'channels_active_monthly' => $channels_active_monthly_stat, 'local_posts' => $local_posts_stat, - 'hide_in_statistics' => get_config('system','hide_in_statistics') + 'hide_in_statistics' => $hide_in_statistics ); json_return_and_die($data); } -- cgit v1.2.3