a subdomain of another
SVN Revision: 322
+2005-04-20 Alexey Shchepin <alexey@sevcom.net>
+
+ * src/mod_disco.erl: Fixed domain listing when one virtual host is
+ a subdomain of another
+
2005-04-18 Alexey Shchepin <alexey@sevcom.net>
* src/web/ejabberd_web_admin.erl: Added link to shared roster page
get_vh_services(Host) ->
- DotHost = "." ++ Host,
+ Hosts = lists:sort(fun(H1, H2) -> length(H1) >= length(H2) end, ?MYHOSTS),
lists:filter(fun(H) ->
- lists:suffix(DotHost, H)
+ case lists:dropwhile(
+ fun(VH) ->
+ not lists:suffix("." ++ VH, H)
+ end, Hosts) of
+ [] ->
+ false;
+ [VH | _] ->
+ VH == Host
+ end
end, ejabberd_router:dirty_get_all_routes()).
get_online_vh_users(Host) ->