diff options
| author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-26 08:34:39 +0000 | 
|---|---|---|
| committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-26 08:34:39 +0000 | 
| commit | 4ad69c6ec8950a480e2a3c6561dd07d7a277b336 (patch) | |
| tree | 41eaabce409a84c8f6d5fc85aca03bc0c973f59b | |
| parent | 7b62937942d4506c2d2a23c4a7211adbeccd83d1 (diff) | |
| download | elgg-4ad69c6ec8950a480e2a3c6561dd07d7a277b336.tar.gz elgg-4ad69c6ec8950a480e2a3c6561dd07d7a277b336.tar.bz2  | |
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
| -rw-r--r-- | engine/lib/statistics.php | 10 | ||||
| -rw-r--r-- | languages/en.php | 5 | ||||
| -rw-r--r-- | 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 <b>Widget gallery</b>.",  			'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 @@          </tr>          <tr class="even">              <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td> -            <td><?php echo $users_stats; ?></td> +            <td><?php echo $users_stats; ?> <?php echo elgg_echo('active'); ?> / <?php echo $total_users; ?> <?php echo elgg_echo('total') ?></td>          </tr>      </table>   | 
