aboutsummaryrefslogtreecommitdiff
path: root/src/mod_privacy_odbc.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2010-07-14 21:23:21 +1000
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2010-07-14 21:23:21 +1000
commit5030f355580ab2686b1df944ea8ab61f5a7ba93f (patch)
tree3e3c183ceba6a1265b5f39dd559df8d0e736cd6d /src/mod_privacy_odbc.erl
parentUse driver allocators in expat for reflecting memory in erlang:memory(system) (diff)
correct handling of SQL boolean types (EJAB-1275)
Diffstat (limited to 'src/mod_privacy_odbc.erl')
-rw-r--r--src/mod_privacy_odbc.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mod_privacy_odbc.erl b/src/mod_privacy_odbc.erl
index ae572ae64..5ad2fb958 100644
--- a/src/mod_privacy_odbc.erl
+++ b/src/mod_privacy_odbc.erl
@@ -726,11 +726,11 @@ raw_to_item({SType, SValue, SAction, SOrder, SMatchAll, SMatchIQ,
"d" -> deny
end,
Order = list_to_integer(SOrder),
- MatchAll = SMatchAll == "1" orelse SMatchAll == "t",
- MatchIQ = SMatchIQ == "1" orelse SMatchIQ == "t" ,
- MatchMessage = SMatchMessage == "1" orelse SMatchMessage == "t",
- MatchPresenceIn = SMatchPresenceIn == "1" orelse SMatchPresenceIn == "t",
- MatchPresenceOut = SMatchPresenceOut == "1" orelse SMatchPresenceOut == "t",
+ MatchAll = ejabberd_odbc:to_bool(SMatchAll),
+ MatchIQ = ejabberd_odbc:to_bool(SMatchIQ),
+ MatchMessage = ejabberd_odbc:to_bool(SMatchMessage),
+ MatchPresenceIn = ejabberd_odbc:to_bool(SMatchPresenceIn),
+ MatchPresenceOut = ejabberd_odbc:to_bool(SMatchPresenceOut),
#listitem{type = Type,
value = Value,
action = Action,