From 4ad69c6ec8950a480e2a3c6561dd07d7a277b336 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 26 Aug 2008 08:34:39 +0000 Subject: Minor tweak to basic stats to clarify number of users in the system. git-svn-id: https://code.elgg.org/elgg/trunk@2041 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/statistics.php | 10 ++++++++-- languages/en.php | 5 ++++- views/default/admin/statistics_opt/basic.php | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/engine/lib/statistics.php b/engine/lib/statistics.php index 89c6d9a09..c1faaa9c7 100644 --- a/engine/lib/statistics.php +++ b/engine/lib/statistics.php @@ -57,13 +57,19 @@ /** * Return the number of users registered in the system. * + * @param bool $show_deactivated * @return int */ - function get_number_users() + function get_number_users($show_deactivated = false) { global $CONFIG; - $result = get_data_row("SELECT count(*) as count from {$CONFIG->dbprefix}entities where type='user'"); + $access = ""; + + if (!$show_deactivated) + $access = "and " . get_access_sql_suffix(); + + $result = get_data_row("SELECT count(*) as count from {$CONFIG->dbprefix}entities where type='user' $access"); if ($result) return $result->count; diff --git a/languages/en.php b/languages/en.php index cdfb22c29..416b6f521 100644 --- a/languages/en.php +++ b/languages/en.php @@ -541,7 +541,10 @@ To remove a widget drag it back to the Widget gallery.", 'option:yes' => "Yes", 'option:no' => "No", - 'unknown' => 'Unknown', + 'unknown' => 'Unknown', + + 'active' => 'Active', + 'total' => 'Total', 'learnmore' => "Click here to learn more.", diff --git a/views/default/admin/statistics_opt/basic.php b/views/default/admin/statistics_opt/basic.php index 07bacd483..1ea3578b5 100644 --- a/views/default/admin/statistics_opt/basic.php +++ b/views/default/admin/statistics_opt/basic.php @@ -12,6 +12,7 @@ // Work out number of users $users_stats = get_number_users(); + $total_users = get_number_users(true); global $CONFIG; @@ -27,7 +28,7 @@ : - + / -- cgit v1.2.3