mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
fix hometree<->flat change
This commit is contained in:
parent
95057c1182
commit
5f89f481e4
@ -2213,7 +2213,7 @@ get_item(Host, Node, ItemId) ->
|
|||||||
send_items(Host, Node, NodeId, Type, LJID, last) ->
|
send_items(Host, Node, NodeId, Type, LJID, last) ->
|
||||||
Stanza = case get_cached_item(Host, NodeId) of
|
Stanza = case get_cached_item(Host, NodeId) of
|
||||||
undefined ->
|
undefined ->
|
||||||
% special ODBC optimization, works only with node_flat_odbc, node_flat_odbc and node_pep_odbc
|
% special ODBC optimization, works only with node_hometree_odbc, node_flat_odbc and node_pep_odbc
|
||||||
case node_action(Host, Type, get_last_items, [NodeId, LJID, 1]) of
|
case node_action(Host, Type, get_last_items, [NodeId, LJID, 1]) of
|
||||||
{result, [LastItem]} ->
|
{result, [LastItem]} ->
|
||||||
{ModifNow, ModifLjid} = LastItem#pubsub_item.modification,
|
{ModifNow, ModifLjid} = LastItem#pubsub_item.modification,
|
||||||
|
@ -962,12 +962,19 @@ get_item_name(_Host, _Node, Id) ->
|
|||||||
Id.
|
Id.
|
||||||
|
|
||||||
node_to_path(Node) ->
|
node_to_path(Node) ->
|
||||||
[list_to_binary(Item) || Item <- string:tokens(binary_to_list(Node), "/")].
|
[Node].
|
||||||
|
|
||||||
path_to_node([]) ->
|
path_to_node([]) ->
|
||||||
<<>>;
|
<<>>;
|
||||||
path_to_node(Path) ->
|
path_to_node(Path) ->
|
||||||
list_to_binary(string:join([""|[binary_to_list(Item) || Item <- Path]], "/")).
|
case Path of
|
||||||
|
% default slot
|
||||||
|
[Node] -> Node;
|
||||||
|
% handle old possible entries, used when migrating database content to new format
|
||||||
|
[Node|_] when is_list(Node) -> list_to_binary(string:join([""|Path], "/"));
|
||||||
|
% default case (used by PEP for example)
|
||||||
|
_ -> list_to_binary(Path)
|
||||||
|
end.
|
||||||
|
|
||||||
%% @spec (Affiliation, Subscription) -> true | false
|
%% @spec (Affiliation, Subscription) -> true | false
|
||||||
%% Affiliation = owner | member | publisher | outcast | none
|
%% Affiliation = owner | member | publisher | outcast | none
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -210,14 +210,7 @@ get_item_name(Host, Node, Id) ->
|
|||||||
node_flat:get_item_name(Host, Node, Id).
|
node_flat:get_item_name(Host, Node, Id).
|
||||||
|
|
||||||
node_to_path(Node) ->
|
node_to_path(Node) ->
|
||||||
[Node].
|
[list_to_binary(Item) || Item <- string:tokens(binary_to_list(Node), "/")].
|
||||||
|
|
||||||
path_to_node(Path) ->
|
path_to_node(Path) ->
|
||||||
case Path of
|
list_to_binary(string:join([""|[binary_to_list(Item) || Item <- Path]], "/")).
|
||||||
% default slot
|
|
||||||
[Node] -> Node;
|
|
||||||
% handle old possible entries, used when migrating database content to new format
|
|
||||||
[Node|_] when is_list(Node) -> list_to_binary(string:join([""|Path], "/"));
|
|
||||||
% default case (used by PEP for example)
|
|
||||||
_ -> list_to_binary(Path)
|
|
||||||
end.
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
--- mod_pubsub.erl 2010-05-17 11:02:22.000000000 +0200
|
--- mod_pubsub.erl 2010-05-17 22:05:12.000000000 +0200
|
||||||
+++ mod_pubsub_odbc.erl 2010-05-17 11:02:08.000000000 +0200
|
+++ mod_pubsub_odbc.erl 2010-05-18 17:28:09.000000000 +0200
|
||||||
@@ -42,7 +42,7 @@
|
@@ -42,7 +42,7 @@
|
||||||
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
||||||
%%% XEP-0060 section 12.18.
|
%%% XEP-0060 section 12.18.
|
||||||
|
Loading…
Reference in New Issue
Block a user