mirror of
https://github.com/processone/ejabberd
synced 2025-10-04 02:09:33 +02:00
Don't validate an option in ejabberd_config:get_option() functions
The commit introduces the following changes: * Now there is no need to pass validating function in ejabberd_config:get_option() functions, because the configuration keeps already validated values. * New function ejabberd_config:get_option/1 is introduced * Function ejabberd_config:get_option/3 is deprecated. If the function is still called, the second argument (validating function) is simply ignored. * The second argument for ejabberd_config:get_option/2 is now a default value, not a validating function.
This commit is contained in:
parent
7129aebe76
commit
b82b93f8f0
43 changed files with 243 additions and 596 deletions
|
@ -439,11 +439,7 @@ short_spec({Module, Attrs}) when is_atom(Module), is_list(Attrs) ->
|
|||
{Module, proplists:get_value(summary, Attrs, "")}.
|
||||
|
||||
is_contrib_allowed() ->
|
||||
ejabberd_config:get_option(allow_contrib_modules,
|
||||
fun(false) -> false;
|
||||
(no) -> false;
|
||||
(_) -> true
|
||||
end, true).
|
||||
ejabberd_config:get_option(allow_contrib_modules, true).
|
||||
|
||||
%% -- build functions
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue