diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_web_admin.erl | 20 | ||||
-rw-r--r-- | src/mod_configure.erl | 10 | ||||
-rw-r--r-- | src/mod_configure2.erl | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/ejabberd_web_admin.erl b/src/ejabberd_web_admin.erl index de9142c18..8a2bacf15 100644 --- a/src/ejabberd_web_admin.erl +++ b/src/ejabberd_web_admin.erl @@ -724,8 +724,8 @@ process_admin(Host, auth = {_, _Auth, AJID}, q = Query, lang = Lang}) -> SetAccess = fun (Rs) -> mnesia:transaction(fun () -> - Os = mnesia:select(config, - [{{config, + Os = mnesia:select(local_config, + [{{local_config, {access, '$1', Host}, @@ -739,7 +739,7 @@ process_admin(Host, lists:foreach(fun ({access, Name, Rules}) -> - mnesia:write({config, + mnesia:write({local_config, {access, Name, Host}, @@ -764,8 +764,8 @@ process_admin(Host, end; _ -> nothing end, - Access = ets:select(config, - [{{config, {access, '$1', Host}, '$2'}, [], + Access = ets:select(local_config, + [{{local_config, {access, '$1', Host}, '$2'}, [], [{{access, '$1', '$2'}}]}]), {NumLines, AccessP} = term_to_paragraph(lists:keysort(2,Access), 80), make_xhtml((?H1GL((?T(<<"Access Rules">>)), @@ -798,8 +798,8 @@ process_admin(Host, end; _ -> nothing end, - AccessRules = ets:select(config, - [{{config, {access, '$1', Host}, '$2'}, [], + AccessRules = ets:select(local_config, + [{{local_config, {access, '$1', Host}, '$2'}, [], [{{access, '$1', '$2'}}]}]), make_xhtml((?H1GL((?T(<<"Access Rules">>)), <<"AccessRights">>, <<"Access Rights">>)) @@ -1181,8 +1181,8 @@ access_rules_to_xhtml(AccessRules, Lang) -> <<"Add New">>)])])]))]). access_parse_query(Host, Query) -> - AccessRules = ets:select(config, - [{{config, {access, '$1', Host}, '$2'}, [], + AccessRules = ets:select(local_config, + [{{local_config, {access, '$1', Host}, '$2'}, [], [{{access, '$1', '$2'}}]}]), case lists:keysearch(<<"addnew">>, 1, Query) of {value, _} -> @@ -1210,7 +1210,7 @@ access_parse_delete(AccessRules, Host, Query) -> case lists:member({<<"selected">>, ID}, Query) of true -> mnesia:transaction(fun () -> - mnesia:delete({config, + mnesia:delete({local_config, {access, Name, Host}}) diff --git a/src/mod_configure.erl b/src/mod_configure.erl index f98bfc788..6462ba133 100644 --- a/src/mod_configure.erl +++ b/src/mod_configure.erl @@ -1365,8 +1365,8 @@ get_form(Host, [<<"config">>, <<"access">>], Lang) -> [{xmlcdata, S}]} end, str:tokens(iolist_to_binary(io_lib:format("~p.", - [ets:select(config, - [{{config, + [ets:select(local_config, + [{{local_config, {access, '$1', '$2'}, @@ -1770,8 +1770,8 @@ set_form(_From, Host, [<<"config">>, <<"access">>], _Lang, XData) -> SetAccess = fun (Rs) -> mnesia:transaction(fun () -> - Os = mnesia:select(config, - [{{config, + Os = mnesia:select(local_config, + [{{local_config, {access, '$1', '$2'}, @@ -1787,7 +1787,7 @@ set_form(_From, Host, [<<"config">>, <<"access">>], lists:foreach(fun ({access, Name, Rules}) -> - mnesia:write({config, + mnesia:write({local_config, {access, Name, Host}, diff --git a/src/mod_configure2.erl b/src/mod_configure2.erl index c4d482d02..e3fbe82dc 100644 --- a/src/mod_configure2.erl +++ b/src/mod_configure2.erl @@ -167,8 +167,8 @@ process_get(#xmlel{name = <<"acls">>, attrs = Attrs}) -> process_get(#xmlel{name = <<"access">>, attrs = Attrs}) -> Str = iolist_to_binary(io_lib:format("~p.", - [ets:select(config, - [{{config, {access, '$1'}, + [ets:select(local_config, + [{{local_config, {access, '$1'}, '$2'}, [], [{{access, '$1', |