diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-14 14:00:47 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-14 14:00:47 +0300 |
commit | fd8e07af4789be362a61755ea47f216baeb64989 (patch) | |
tree | 0ac0a7a779fd27e79e940519441161dc0c4dfd5f /src/pubsub_subscription_sql.erl | |
parent | Log modules startup (diff) |
Get rid of ejabberd.hrl header
The header consisted of too many unrelated stuff and macros misuse.
Some stuff is moved into scram.hrl and type_compat.hrl.
All macros have been replaced with the corresponding function calls.
TODO: probably type_compat.hrl is not even needed anymore since
we support only Erlang >= OTP 17.5
Diffstat (limited to 'src/pubsub_subscription_sql.erl')
-rw-r--r-- | src/pubsub_subscription_sql.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pubsub_subscription_sql.erl b/src/pubsub_subscription_sql.erl index 06ad73b2..2fcfb0f1 100644 --- a/src/pubsub_subscription_sql.erl +++ b/src/pubsub_subscription_sql.erl @@ -172,13 +172,13 @@ val_xfield(digest_frequency = Opt, [Val]) -> N when is_integer(N) -> N; _ -> Txt = {<<"Value of '~s' should be integer">>, [Opt]}, - {error, xmpp:err_not_acceptable(Txt, ?MYLANG)} + {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())} end; val_xfield(expire = Opt, [Val]) -> try xmpp_util:decode_timestamp(Val) catch _:{bad_timestamp, _} -> Txt = {<<"Value of '~s' should be datetime string">>, [Opt]}, - {error, xmpp:err_not_acceptable(Txt, ?MYLANG)} + {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())} end; val_xfield(include_body = Opt, [Val]) -> xopt_to_bool(Opt, Val); val_xfield(show_values, Vals) -> Vals; @@ -190,7 +190,7 @@ val_xfield(subscription_depth = Opt, [Depth]) -> N when is_integer(N) -> N; _ -> Txt = {<<"Value of '~s' should be integer">>, [Opt]}, - {error, xmpp:err_not_acceptable(Txt, ?MYLANG)} + {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())} end. %% Convert XForm booleans to Erlang booleans. @@ -200,7 +200,7 @@ xopt_to_bool(_, <<"false">>) -> false; xopt_to_bool(_, <<"true">>) -> true; xopt_to_bool(Option, _) -> Txt = {<<"Value of '~s' should be boolean">>, [Option]}, - {error, xmpp:err_not_acceptable(Txt, ?MYLANG)}. + {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())}. %% Return a field for an XForm for Key, with data filled in, if %% applicable, from Options. |