mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-25 14:24:55 +02:00
Remove useless clauses
This commit is contained in:
parent
eccb499346
commit
7ae7d6315f
@ -106,16 +106,6 @@ get_menu_items(global, cluster, Lang, JID) ->
|
|||||||
);
|
);
|
||||||
get_menu_items(Host, cluster, Lang, JID) ->
|
get_menu_items(Host, cluster, Lang, JID) ->
|
||||||
{Base, _, Items} = make_host_menu(Host, [], Lang, JID),
|
{Base, _, Items} = make_host_menu(Host, [], Lang, JID),
|
||||||
lists:map(
|
|
||||||
fun({URI, Name}) ->
|
|
||||||
{Base++URI++"/", Name};
|
|
||||||
({URI, Name, _SubMenu}) ->
|
|
||||||
{Base++URI++"/", Name}
|
|
||||||
end,
|
|
||||||
Items
|
|
||||||
);
|
|
||||||
get_menu_items(Host, Node, Lang, JID) ->
|
|
||||||
{Base, _, Items} = make_host_node_menu(Host, Node, Lang, JID),
|
|
||||||
lists:map(
|
lists:map(
|
||||||
fun({URI, Name}) ->
|
fun({URI, Name}) ->
|
||||||
{Base++URI++"/", Name};
|
{Base++URI++"/", Name};
|
||||||
@ -124,6 +114,16 @@ get_menu_items(Host, Node, Lang, JID) ->
|
|||||||
end,
|
end,
|
||||||
Items
|
Items
|
||||||
).
|
).
|
||||||
|
%% get_menu_items(Host, Node, Lang, JID) ->
|
||||||
|
%% {Base, _, Items} = make_host_node_menu(Host, Node, Lang, JID),
|
||||||
|
%% lists:map(
|
||||||
|
%% fun({URI, Name}) ->
|
||||||
|
%% {Base++URI++"/", Name};
|
||||||
|
%% ({URI, Name, _SubMenu}) ->
|
||||||
|
%% {Base++URI++"/", Name}
|
||||||
|
%% end,
|
||||||
|
%% Items
|
||||||
|
%% ).
|
||||||
|
|
||||||
is_allowed_path(BasePath, {Path, _}, JID) ->
|
is_allowed_path(BasePath, {Path, _}, JID) ->
|
||||||
is_allowed_path(BasePath ++ [Path], JID);
|
is_allowed_path(BasePath ++ [Path], JID);
|
||||||
@ -2023,7 +2023,6 @@ get_node(global, Node, ["db"], Query, Lang) ->
|
|||||||
get_node(global, Node, ["backup"], Query, Lang) ->
|
get_node(global, Node, ["backup"], Query, Lang) ->
|
||||||
HomeDirRaw = case {os:getenv("HOME"), os:type()} of
|
HomeDirRaw = case {os:getenv("HOME"), os:type()} of
|
||||||
{EnvHome, _} when is_list(EnvHome) -> EnvHome;
|
{EnvHome, _} when is_list(EnvHome) -> EnvHome;
|
||||||
{false, win32} -> "C:/";
|
|
||||||
{false, {win32, _Osname}} -> "C:/";
|
{false, {win32, _Osname}} -> "C:/";
|
||||||
{false, _} -> "/tmp/"
|
{false, _} -> "/tmp/"
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user