25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

* odbc_queries: fix list_users queries with limit/offset.

SVN Revision: 1193
This commit is contained in:
Jérôme Sautret 2008-02-15 15:39:30 +00:00
parent 746c6b7d24
commit 86445aff3e

View File

@ -143,11 +143,11 @@ list_users(LServer) ->
list_users(LServer, [{from, Start}, {to, End}]) when is_integer(Start) and list_users(LServer, [{from, Start}, {to, End}]) when is_integer(Start) and
is_integer(End) -> is_integer(End) ->
list_users(LServer, [{limit, End-Start}, {offset, Start-1}]); list_users(LServer, [{limit, End-Start+1}, {offset, Start-1}]);
list_users(LServer, [{prefix, Prefix}, {from, Start}, {to, End}]) when is_list(Prefix) and list_users(LServer, [{prefix, Prefix}, {from, Start}, {to, End}]) when is_list(Prefix) and
is_integer(Start) and is_integer(Start) and
is_integer(End) -> is_integer(End) ->
list_users(LServer, [{prefix, Prefix}, {limit, End-Start}, {offset, Start}]); list_users(LServer, [{prefix, Prefix}, {limit, End-Start+1}, {offset, Start-1}]);
list_users(LServer, [{limit, Limit}, {offset, Offset}]) when is_integer(Limit) and list_users(LServer, [{limit, Limit}, {offset, Offset}]) when is_integer(Limit) and
is_integer(Offset) -> is_integer(Offset) ->