24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-08-14 01:38:09 +02:00

Fix return values of some functions. newgroups argument changed to groups.

This commit is contained in:
Badlop 2010-10-21 00:23:33 +02:00
parent ca62271a89
commit 6c0e9ef575

View File

@ -223,15 +223,15 @@ commands() ->
#ejabberd_commands{name = add_rosteritem_groups, tags = [roster], #ejabberd_commands{name = add_rosteritem_groups, tags = [roster],
desc = "Add new groups in an existing roster item", desc = "Add new groups in an existing roster item",
longdesc = "The argument newgroups must be a string with group names separated by the character ;", longdesc = "The argument Groups must be a string with group names separated by the character ;",
module = ?MODULE, function = add_rosteritem_groups, module = ?MODULE, function = add_rosteritem_groups,
args = [{user, string}, {server, string}, {jid, string}, args = [{user, string}, {server, string}, {jid, string},
{newgroups, string}, {push, string}], {groups, string}, {push, string}],
result = {res, integer}}, result = {res, integer}},
#ejabberd_commands{name = del_rosteritem_groups, tags = [roster], #ejabberd_commands{name = del_rosteritem_groups, tags = [roster],
desc = "Delete groups in an existing roster item", desc = "Delete groups in an existing roster item",
longdesc = "The argument groups must be a string with group names separated by the character ;", longdesc = "The argument Groups must be a string with group names separated by the character ;",
module = ?MODULE, function = del_rosteritem_groups, module = ?MODULE, function = del_rosteritem_groups,
args = [{user, string}, {server, string}, {jid, string}, args = [{user, string}, {server, string}, {jid, string},
{groups, string}, {push, string}], {groups, string}, {push, string}],
@ -239,7 +239,7 @@ commands() ->
#ejabberd_commands{name = modify_rosteritem_groups, tags = [roster], #ejabberd_commands{name = modify_rosteritem_groups, tags = [roster],
desc = "Modify the groups of an existing roster item", desc = "Modify the groups of an existing roster item",
longdesc = "The argument groups must be a string with group names separated by the character ;", longdesc = "The argument Groups must be a string with group names separated by the character ;",
module = ?MODULE, function = modify_rosteritem_groups, module = ?MODULE, function = modify_rosteritem_groups,
args = [{user, string}, {server, string}, {jid, string}, args = [{user, string}, {server, string}, {jid, string},
{groups, string}, {subs, string}, {push, string}], {groups, string}, {subs, string}, {push, string}],
@ -730,13 +730,13 @@ add_rosteritem_groups(User, Server, JID, NewGroupsString, PushString) ->
{true, true} -> {true, true} ->
case add_rosteritem_groups2(User, Server, JID, NewGroups, Push) of case add_rosteritem_groups2(User, Server, JID, NewGroups, Push) of
ok -> ok ->
{false, {response, [0]}}; 0;
Error -> Error ->
?INFO_MSG("Error found: ~n~p", [Error]), ?INFO_MSG("Error found: ~n~p", [Error]),
{false, {response, [1]}} 1
end; end;
_ -> _ ->
{false, {response, [404]}} 404
end. end.
del_rosteritem_groups(User, Server, JID, NewGroupsString, PushString) -> del_rosteritem_groups(User, Server, JID, NewGroupsString, PushString) ->
@ -747,13 +747,13 @@ del_rosteritem_groups(User, Server, JID, NewGroupsString, PushString) ->
{true, true} -> {true, true} ->
case del_rosteritem_groups2(User, Server, JID, NewGroups, Push) of case del_rosteritem_groups2(User, Server, JID, NewGroups, Push) of
ok -> ok ->
{false, {response, [0]}}; 0;
Error -> Error ->
?INFO_MSG("Error found: ~n~p", [Error]), ?INFO_MSG("Error found: ~n~p", [Error]),
{false, {response, [1]}} 1
end; end;
_ -> _ ->
{false, {response, [404]}} 404
end. end.
modify_rosteritem_groups(User, Server, JID, NewGroupsString, SubsString, PushString) -> modify_rosteritem_groups(User, Server, JID, NewGroupsString, SubsString, PushString) ->
@ -766,13 +766,13 @@ modify_rosteritem_groups(User, Server, JID, NewGroupsString, SubsString, PushStr
{true, true} -> {true, true} ->
case modify_rosteritem_groups2(User, Server, JID, NewGroups, Push, Nick, Subs) of case modify_rosteritem_groups2(User, Server, JID, NewGroups, Push, Nick, Subs) of
ok -> ok ->
{false, {response, [0]}}; 0;
Error -> Error ->
?INFO_MSG("Error found: ~n~p", [Error]), ?INFO_MSG("Error found: ~n~p", [Error]),
{false, {response, [1]}} 1
end; end;
_ -> _ ->
{false, {response, [404]}} 404
end. end.
add_rosteritem_groups2(User, Server, JID, NewGroups, Push) -> add_rosteritem_groups2(User, Server, JID, NewGroups, Push) ->