mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
More fix Host usage when running webadmin_page_*
This commit is contained in:
parent
cd2d207877
commit
9c2f0681f0
@ -2451,7 +2451,7 @@ get_node(global, Node, ["pid"], _Query, Lang) ->
|
|||||||
ProcessesList = lists:map(
|
ProcessesList = lists:map(
|
||||||
fun(P) ->
|
fun(P) ->
|
||||||
PS = pid_to_list(P),
|
PS = pid_to_list(P),
|
||||||
NodePidS = NodeS ++ "/pid/" ++ PS,
|
NodePidS = NodeS ++ "/pid/process/" ++ PS,
|
||||||
?AC("/admin/node/" ++ NodePidS ++ "/", PS)
|
?AC("/admin/node/" ++ NodePidS ++ "/", PS)
|
||||||
end,
|
end,
|
||||||
Processes),
|
Processes),
|
||||||
@ -2684,11 +2684,12 @@ get_node(global, Node, ["update"], Query, Lang) ->
|
|||||||
];
|
];
|
||||||
|
|
||||||
get_node(Host, Node, NPath, Query, Lang) ->
|
get_node(Host, Node, NPath, Query, Lang) ->
|
||||||
{Hook, Opts} = case Host of
|
{Hook, Opts, HostB} =
|
||||||
global -> {webadmin_page_node, [Node, NPath, Query, Lang]};
|
case Host of
|
||||||
Host -> {webadmin_page_hostnode, [Host, Node, NPath, Query, Lang]}
|
global -> {webadmin_page_node, [Node, NPath, Query, Lang], global};
|
||||||
end,
|
Host -> {webadmin_page_hostnode, [Host, Node, NPath, Query, Lang], list_to_binary(Host)}
|
||||||
case ejabberd_hooks:run_fold(Hook, list_to_binary(Host), [], Opts) of
|
end,
|
||||||
|
case ejabberd_hooks:run_fold(Hook, HostB, [], Opts) of
|
||||||
[] -> [?XC('h1', "Not Found")];
|
[] -> [?XC('h1', "Not Found")];
|
||||||
Res -> Res
|
Res -> Res
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user