aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2016-07-03 22:58:54 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2016-07-03 22:58:54 +0200
commit8e04a7ef4d6225c2ca4b2bdc59b50d0ff11e4217 (patch)
tree23058f95e6a0b8e9a27758beae41a07ba07e0393 /src
parentGrab new p1_utils that has fix for R19 (diff)
mod_configure: Fix editing of access rules
Diffstat (limited to 'src')
-rw-r--r--src/mod_configure.erl19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mod_configure.erl b/src/mod_configure.erl
index 515127684..9d4086559 100644
--- a/src/mod_configure.erl
+++ b/src/mod_configure.erl
@@ -1368,10 +1368,9 @@ get_form(Host, [<<"config">>, <<"access">>], Lang) ->
[{xmlcdata, S}]}
end,
str:tokens(iolist_to_binary(io_lib:format("~p.",
- [ets:select(local_config,
- [{{local_config,
- {access,
- '$1',
+ [ets:select(access,
+ [{{access,
+ {'$1',
'$2'},
'$3'},
[{'==',
@@ -1826,10 +1825,9 @@ set_form(_From, Host, [<<"config">>, <<"access">>],
Lang, XData) ->
SetAccess = fun (Rs) ->
mnesia:transaction(fun () ->
- Os = mnesia:select(local_config,
- [{{local_config,
- {access,
- '$1',
+ Os = mnesia:select(access,
+ [{{access,
+ {'$1',
'$2'},
'$3'},
[{'==',
@@ -1843,9 +1841,8 @@ set_form(_From, Host, [<<"config">>, <<"access">>],
lists:foreach(fun ({access,
Name,
Rules}) ->
- mnesia:write({local_config,
- {access,
- Name,
+ mnesia:write({access,
+ {Name,
Host},
Rules})
end,