mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Show Last Activity menu item in Webadmin only if vhost has mod_last (EJAB-1031)
SVN Revision: 2799
This commit is contained in:
parent
8ac16a0ec1
commit
65aed47873
@ -1597,6 +1597,11 @@ get_lastactivity_module(Server) ->
|
|||||||
_ -> mod_last_odbc
|
_ -> mod_last_odbc
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
get_lastactivity_menuitem_list(Server) ->
|
||||||
|
case get_lastactivity_module(Server) of
|
||||||
|
mod_last -> [{"last-activity", "Last Activity"}];
|
||||||
|
mod_last_odbc -> []
|
||||||
|
end.
|
||||||
|
|
||||||
us_to_list({User, Server}) ->
|
us_to_list({User, Server}) ->
|
||||||
jlib:jid_to_string({User, Server, ""}).
|
jlib:jid_to_string({User, Server, ""}).
|
||||||
@ -2707,9 +2712,9 @@ make_host_menu(Host, HostNodeMenu, Lang, JID) ->
|
|||||||
HostFixed = [{"acls", "Access Control Lists"},
|
HostFixed = [{"acls", "Access Control Lists"},
|
||||||
{"access", "Access Rules"},
|
{"access", "Access Rules"},
|
||||||
{"users", "Users"},
|
{"users", "Users"},
|
||||||
{"online-users", "Online Users"},
|
{"online-users", "Online Users"}]
|
||||||
{"last-activity", "Last Activity"},
|
++ get_lastactivity_menuitem_list(Host) ++
|
||||||
{"nodes", "Nodes", HostNodeMenu},
|
[{"nodes", "Nodes", HostNodeMenu},
|
||||||
{"stats", "Statistics"}]
|
{"stats", "Statistics"}]
|
||||||
++ get_menu_items_hook({host, Host}, Lang),
|
++ get_menu_items_hook({host, Host}, Lang),
|
||||||
HostBasePath = url_to_path(HostBase),
|
HostBasePath = url_to_path(HostBase),
|
||||||
|
Loading…
Reference in New Issue
Block a user