]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_stats.erl: Updated
authorAlexey Shchepin <alexey@process-one.net>
Sat, 12 May 2007 18:14:21 +0000 (18:14 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Sat, 12 May 2007 18:14:21 +0000 (18:14 +0000)
* src/web/ejabberd_web_admin.erl: Likewise

SVN Revision: 767

ChangeLog
src/mod_stats.erl
src/web/ejabberd_web_admin.erl

index 216974af4dd8d7ff6f5c953c5e50ce870e16e780..a21b8dc8cbbfb60fc8ed1115bcc3752e2d52fe57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
        * src/odbc/odbc_queries.erl: Added users_number/1 function
        * src/ejabberd.cfg.example: Added an example for
        pgsql_users_number_estimate option
+       * src/mod_stats.erl: Updated
+       * src/web/ejabberd_web_admin.erl: Likewise
 
        * src/ejabberd_auth_anonymous.erl: Added anonymous_purge_hook
        (thanks to Christophe Romain and Mickael Remond)
index f379b295f2fa7889af5823202e273f104bbb6e82..dcc72c98d970fc81836f3d3a42c5d22288354ea3 100644 (file)
@@ -129,11 +129,11 @@ get_local_stat(Server, [], Name) when Name == "users/online" ->
 
 get_local_stat(Server, [], Name) when Name == "users/total" ->
     LServer = jlib:nameprep(Server),
-    case catch ejabberd_auth:get_vh_registered_users(Server) of
+    case catch ejabberd_auth:get_vh_registered_users_number(Server) of
        {'EXIT', Reason} ->
            ?STATERR("500", "Internal Server Error");
-       Users ->
-           ?STATVAL(integer_to_list(length(Users)), "users")
+       NUsers ->
+           ?STATVAL(integer_to_list(NUsers), "users")
     end;
 
 get_local_stat(_Server, [], Name) when Name == "users/all-hosts/online" ->
index 61183f736eefbbcc3924999e20d553a198b24cbc..cd054a62f7968d3e78bfe94802207aa34e3c4834 100644 (file)
@@ -1289,7 +1289,7 @@ list_vhosts(Lang) ->
                        OnlineUsers =
                            length(ejabberd_sm:get_vh_session_list(Host)),
                        RegisteredUsers =
-                           length(ejabberd_auth:get_vh_registered_users(Host)),
+                           ejabberd_auth:get_vh_registered_users_number(Host),
                        ?XE("tr",
                            [?XE("td", [?AC("../server/" ++ Host ++ "/", Host)]),
                             ?XC("td", integer_to_list(RegisteredUsers)),
@@ -1461,7 +1461,7 @@ get_stats(global, Lang) ->
 
 get_stats(Host, Lang) ->
     OnlineUsers = length(ejabberd_sm:get_vh_session_list(Host)),
-    RegisteredUsers = length(ejabberd_auth:get_vh_registered_users(Host)),
+    RegisteredUsers = ejabberd_auth:get_vh_registered_users_number(Host),
     [?XAE("table", [],
          [?XE("tbody",
               [?XE("tr", [?XCT("td", "Registered Users:"),