# HG changeset patch # User Sebastien Jodogne # Date 1573107642 -3600 # Node ID 28ab86c6730e7da1e2a45fc4c597af66c2b1f9cb # Parent fb759c9efd737651b60c8b2d9607a08266004523 "/changes": Allow the "limit" argument to be greater than 100 diff -r fb759c9efd73 -r 28ab86c6730e NEWS --- a/NEWS Tue Nov 05 08:10:12 2019 +0100 +++ b/NEWS Thu Nov 07 07:20:42 2019 +0100 @@ -1,6 +1,8 @@ Pending changes in the mainline =============================== +* "/changes": Allow the "limit" argument to be greater than 100 + Version 1.5.8 (2019-10-16) ========================== diff -r fb759c9efd73 -r 28ab86c6730e OrthancServer/OrthancRestApi/OrthancRestChanges.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestChanges.cpp Tue Nov 05 08:10:12 2019 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestChanges.cpp Thu Nov 07 07:20:42 2019 +0100 @@ -45,7 +45,7 @@ bool& last, const RestApiGetCall& call) { - static const unsigned int MAX_RESULTS = 100; + static const unsigned int DEFAULT_LIMIT = 100; if (call.HasArgument("last")) { @@ -58,17 +58,14 @@ try { since = boost::lexical_cast(call.GetArgument("since", "0")); - limit = boost::lexical_cast(call.GetArgument("limit", "0")); + limit = boost::lexical_cast(call.GetArgument("limit", boost::lexical_cast(DEFAULT_LIMIT))); } catch (boost::bad_lexical_cast&) { + since = 0; + limit = DEFAULT_LIMIT; return; } - - if (limit == 0 || limit > MAX_RESULTS) - { - limit = MAX_RESULTS; - } } static void GetChanges(RestApiGetCall& call)