? people-stats.patch
Index: l10n_community/l10n_community.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.module,v
retrieving revision 1.1.2.23.2.42
diff -u -p -r1.1.2.23.2.42 l10n_community.module
--- l10n_community/l10n_community.module	21 Aug 2009 13:41:01 -0000	1.1.2.23.2.42
+++ l10n_community/l10n_community.module	1 Sep 2009 15:07:26 -0000
@@ -1377,7 +1377,7 @@ function l10n_community_get_stats($langc
       $stats['strings'] = db_result(db_query('SELECT COUNT(*) FROM {l10n_community_string}'));
       $stats['translations'] = db_result(db_query("SELECT COUNT(*) FROM {l10n_community_translation} WHERE is_suggestion = 0 AND is_active = 1 AND language = '%s' AND translation != ''", $langcode));
       $stats['suggestions'] = db_result(db_query("SELECT COUNT(*) FROM {l10n_community_translation} WHERE is_suggestion = 1 AND is_active = 1 AND language = '%s'", $langcode));
-      $stats['users'] = db_result(db_query("SELECT COUNT(DISTINCT uid_entered) FROM {l10n_community_translation} WHERE is_suggestion = 1 AND is_active = 1 AND language = '%s' AND translation != ''", $langcode));
+      $stats['users'] = db_result(db_query("SELECT COUNT(DISTINCT uid_entered) FROM {l10n_community_translation} WHERE is_suggestion = 0 AND is_active = 1 AND language = '%s' AND translation != ''", $langcode));
 
       // Cache results for next time. Not setting a timestamp as cache validity
       // time, we would like to retain control of recalculating these values.
Index: l10n_community/pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/pages.inc,v
retrieving revision 1.1.2.20.2.17
diff -u -p -r1.1.2.20.2.17 pages.inc
--- l10n_community/pages.inc	28 Aug 2009 15:56:45 -0000	1.1.2.20.2.17
+++ l10n_community/pages.inc	1 Sep 2009 15:07:26 -0000
@@ -504,7 +504,9 @@ function l10n_community_get_string_count
 
     case 'top-people':
       // Get summaries of people having most active translations per language.
-      $result = db_query_range("SELECT COUNT(DISTINCT t.sid) AS sum, u.name, u.uid FROM {l10n_community_translation} t LEFT JOIN {users} u ON t.uid_entered = u.uid WHERE t.is_active = 1 AND t.is_suggestion = 0 AND t.language = '%s' GROUP BY t.uid_entered ORDER BY sum DESC", $id, 0, 10);
+      // Skip anonymous since that is used for placeholders when there was
+      // no prior translations for a suggestion.
+      $result = db_query_range("SELECT COUNT(DISTINCT t.sid) AS sum, u.name, u.uid FROM {l10n_community_translation} t LEFT JOIN {users} u ON t.uid_entered = u.uid WHERE t.is_active = 1 AND t.is_suggestion = 0 AND t.language = '%s' AND u.uid != 0 GROUP BY t.uid_entered ORDER BY sum DESC", $id, 0, 10);
       $accounts = array();
       while ($account = db_fetch_object($result)) {
         $accounts[] = $account;
