25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-11 15:08:56 +02:00

* src/mod_privacy.erl: Privacy list items must be processed in the

specified order (EJAB-848)
* src/mod_privacy_odbc.erl: Likewise

SVN Revision: 1822
This commit is contained in:
Badlop 2009-01-16 16:06:21 +00:00
parent 47ff640292
commit 43e12a3702
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2009-01-16 Badlop <badlop@process-one.net>
* src/mod_privacy.erl: Privacy list items must be processed in the
specified order (EJAB-848)
* src/mod_privacy_odbc.erl: Likewise
2009-01-13 Badlop <badlop@process-one.net>
* doc/release_notes_2.0.3.txt: Add release notes

View File

@ -414,7 +414,12 @@ parse_items(Els) ->
parse_items(Els, []).
parse_items([], Res) ->
lists:reverse(Res);
%% Sort the items by their 'order' attribute
%% 5 is the position of 'order' attribute in a #listitem tuple
%% This integer can be calculated at runtime with:
%% 2 + length(lists:takewhile(fun(E) -> E =/= order end,
%% record_info(fields, listitem))),
lists:keysort(5, Res);
parse_items([{xmlelement, "item", Attrs, SubEls} | Els], Res) ->
Type = xml:get_attr("type", Attrs),
Value = xml:get_attr("value", Attrs),

View File

@ -414,7 +414,12 @@ parse_items(Els) ->
parse_items(Els, []).
parse_items([], Res) ->
lists:reverse(Res);
%% Sort the items by their 'order' attribute
%% 5 is the position of 'order' attribute in a #listitem tuple
%% This integer can be calculated at runtime with:
%% 2 + length(lists:takewhile(fun(E) -> E =/= order end,
%% record_info(fields, listitem))),
lists:keysort(5, Res);
parse_items([{xmlelement, "item", Attrs, SubEls} | Els], Res) ->
Type = xml:get_attr("type", Attrs),
Value = xml:get_attr("value", Attrs),