diff options
author | Badlop <badlop@process-one.net> | 2020-08-21 17:33:44 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2020-08-21 18:08:59 +0200 |
commit | e7575ab63f7fa9117b87e980e5b3728805bdd9e5 (patch) | |
tree | b5dca89cc1470785a6c044a7b2e9c6862cdd8cb6 /tools | |
parent | Fix vCard search by User when using Mnesia (diff) |
For mod_vcard_* modules, redirect options to mod_vcard
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/opt_types.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/opt_types.sh b/tools/opt_types.sh index 658357cb..8de6d894 100755 --- a/tools/opt_types.sh +++ b/tools/opt_types.sh @@ -106,15 +106,23 @@ emit_funs(Fd, _Mod, Specs, Globals) -> emit_funs(Fd, Mod, Specs) -> lists:foreach( fun({Opt, Type}) -> + Mod2 = strip_db_type(Mod), log(Fd, "-spec ~s(gen_mod:opts() | global | binary()) -> ~s.~n" "~s(Opts) when is_map(Opts) ->~n" " gen_mod:get_opt(~s, Opts);~n" "~s(Host) ->~n" " gen_mod:get_module_opt(Host, ~s, ~s).~n", - [Opt, t_to_string(Type), Opt, Opt, Opt, Mod, Opt]) + [Opt, t_to_string(Type), Opt, Opt, Opt, Mod2, Opt]) end, Specs). +strip_db_type(mod_vcard_ldap) -> + mod_vcard; +strip_db_type(mod_vcard_mnesia) -> + mod_vcard; +strip_db_type(Mod) -> + Mod. + append({globals, Form}, _File, State) -> [Clause] = erl_syntax:function_clauses(Form), Body = lists:last(erl_syntax:clause_body(Clause)), |