* src/mod_pubsub/mod_pubsub.erl: Fix compilation warnings

* src/mod_pubsub/node_zoo.erl: Likewise
* src/mod_shared_roster.erl: Likewise

SVN Revision: 1428
This commit is contained in:
Badlop 2008-07-09 21:26:25 +00:00
parent a2bed6709c
commit f1f0bb0431
4 changed files with 13 additions and 5 deletions

View File

@ -1,9 +1,13 @@
2008-07-09 Badlop <badlop@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: Fix compilation warnings
* src/mod_pubsub/node_zoo.erl: Likewise
* src/mod_shared_roster.erl: Allow to get subscribed to a contact
that is already in the roster by means of a shared roster group:
add it to another roster group and it gets subscribed
automatically (EJAB-407)
* src/mod_roster.erl: Likewise
* src/mod_muc/mod_muc_log.erl: Fix XHTML compliance: ensure some

View File

@ -2602,7 +2602,7 @@ set_xoption([], NewOpts) ->
NewOpts;
set_xoption([{"FORM_TYPE", _} | Opts], NewOpts) ->
set_xoption(Opts, NewOpts);
set_xoption([{"pubsub#roster_groups_allowed", Value} | Opts], NewOpts) ->
set_xoption([{"pubsub#roster_groups_allowed", _Value} | Opts], NewOpts) ->
?SET_LIST_XOPT(roster_groups_allowed, []); % XXX: waiting for EJAB-659 to be solved
set_xoption([{"pubsub#deliver_payloads", [Val]} | Opts], NewOpts) ->
?SET_BOOL_XOPT(deliver_payloads, Val);

View File

@ -57,7 +57,8 @@
get_items/2,
get_item/8,
get_item/3,
set_item/1
set_item/1,
get_item_name/3
]).
@ -90,9 +91,9 @@ features() ->
%% use same code as node_default, but do not limite node to
%% the home/localhost/user/... hierarchy
%% any node is allowed
create_node_permission(Host, ServerHost, Node, ParentNode, Owner, Access) ->
create_node_permission(_Host, ServerHost, _Node, _ParentNode, Owner, Access) ->
LOwner = jlib:jid_tolower(Owner),
{User, Server, _Resource} = LOwner,
%%{_User, _Server, _Resource} = LOwner,
Allowed = case acl:match_rule(ServerHost, Access, LOwner) of
allow ->
true;
@ -175,3 +176,6 @@ get_item(Host, Node, ItemId, JID, AccessModel, PresenceSubscription, RosterGroup
set_item(Item) ->
node_default:set_item(Item).
get_item_name(Host, Node, Id) ->
node_default:get_item_name(Host, Node, Id).

View File

@ -488,7 +488,7 @@ get_user_displayed_groups(US) ->
end, get_user_groups(US))),
[Group || Group <- DisplayedGroups1, is_group_enabled(Host, Group)].
is_user_in_group({U, S} = US, Group, Host) ->
is_user_in_group({_U, S} = US, Group, Host) ->
case catch mnesia:dirty_match_object(
#sr_user{us=US, group_host={Group, Host}}) of
[] -> lists:member(US, get_group_users(S, Group));