fix(ZP-646): BackendSearchLDAP uses bad range limit

We have to use the calculated maximum value, that it's not the
number of matches found.
Signed-off-by: 's avatarFrancisco Miguel Biete &lt;fbiete@gmail.com&gt; <fmbiete@gmail.com>
parent 119acfdc
......@@ -138,7 +138,7 @@ class BackendSearchLDAP implements ISearchProvider {
$querycnt = $searchresult['count'];
//do not return more results as requested in range
$querylimit = (($rangeend + 1) < $querycnt) ? ($rangeend + 1) : $querycnt;
$items['range'] = $rangestart.'-'.($querycnt-1);
$items['range'] = $rangestart.'-'.($querylimit-1);
$items['searchtotal'] = $querycnt;
$rc = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment