GJ = node_hometree_odbc:encode_jid(GenKey),
Query = case SubKey of
GenKey ->
- ["select host, node, type, i.nodeid, jid, subscription "
+ ["select host, node, type, i.nodeid, jid, subscriptions "
"from pubsub_state i, pubsub_node n "
"where i.nodeid = n.nodeid "
"and jid like '", GJ, "%' "
"and host like '%@", Host, "';"];
_ ->
- ["select host, node, type, i.nodeid, jid, subscription "
+ ["select host, node, type, i.nodeid, jid, subscriptions "
"from pubsub_state i, pubsub_node n "
"where i.nodeid = n.nodeid "
"and jid in ('", SJ, "', '", GJ, "') "
"and host like '%@", Host, "';"]
end,
Reply = case catch ejabberd_odbc:sql_query_t(Query) of
- {selected, ["host", "node", "type", "nodeid", "jid", "subscription"], RItems} ->
+ {selected, ["host", "node", "type", "nodeid", "jid", "subscriptions"], RItems} ->
lists:map(fun({H, N, T, I, J, S}) ->
O = node_hometree_odbc:decode_jid(H),
Node = nodetree_odbc:raw_to_node(O, {N, "", T, I}),
- {Node, node_hometree_odbc:decode_subscription(S), node_hometree_odbc:decode_jid(J)}
+ {Node, node_hometree_odbc:decode_subscriptions(S), node_hometree_odbc:decode_jid(J)}
end, RItems);
_ ->
[]
GJ = node_hometree_odbc:encode_jid(GenKey),
Query = case SubKey of
GenKey ->
- ["select host, node, type, i.nodeid, jid, subscription "
+ ["select host, node, type, i.nodeid, jid, subscriptions "
"from pubsub_state i, pubsub_node n, pubsub_node_option o "
"where i.nodeid = n.nodeid and n.nodeid = o.nodeid "
"and name='send_last_published_item' and val='on_sub_and_presence' "
"and jid like '", GJ, "%' "
"and host like '%@", Host, "';"];
_ ->
- ["select host, node, type, i.nodeid, jid, subscription "
+ ["select host, node, type, i.nodeid, jid, subscriptions "
"from pubsub_state i, pubsub_node n, pubsub_node_option o "
"where i.nodeid = n.nodeid and n.nodeid = o.nodeid "
"and name='send_last_published_item' and val='on_sub_and_presence' "
"and host like '%@", Host, "';"]
end,
Reply = case catch ejabberd_odbc:sql_query_t(Query) of
- {selected, ["host", "node", "type", "nodeid", "jid", "subscription"], RItems} ->
+ {selected, ["host", "node", "type", "nodeid", "jid", "subscriptions"], RItems} ->
lists:map(fun({H, N, T, I, J, S}) ->
O = node_hometree_odbc:decode_jid(H),
Node = nodetree_odbc:raw_to_node(O, {N, "", T, I}),
- {Node, node_hometree_odbc:decode_subscription(S), node_hometree_odbc:decode_jid(J)}
+ {Node, node_hometree_odbc:decode_subscriptions(S), node_hometree_odbc:decode_jid(J)}
end, RItems);
_ ->
[]