]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib: get_user_by_capability() - Fix pagination
authormartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 23:25:03 +0000 (23:25 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 23:25:03 +0000 (23:25 +0000)
Ooops! Off-by-one error

MDL-12452

lib/accesslib.php

index 4ccf992e159d09dcb6c73226365088dd6d7a70f0..1a33d5763041aecbec62363230c983bea04f5a10 100755 (executable)
@@ -4526,7 +4526,7 @@ function get_users_by_capability($context, $capability, $fields='', $sort='',
             }
 
             // Did we hit pagination limit?
-            if ($limitnum !==0 && $c > ($limitfrom+$limitnum)) { // we are done!
+            if ($limitnum !==0 && $c >= ($limitfrom+$limitnum)) { // we are done!
                 break;
             }