MDL-48830 accesslib: Add sort field to query
authorMichael Aherne <michael.aherne@strath.ac.uk>
Tue, 13 Jan 2015 14:47:34 +0000 (14:47 +0000)
committerMichael Aherne <michael.aherne@strath.ac.uk>
Thu, 15 Jan 2015 10:12:23 +0000 (10:12 +0000)
lib/accesslib.php

index ae8ab33..fb679a9 100644 (file)
@@ -2927,7 +2927,7 @@ function get_capability_info($capabilityname) {
 
     if (empty($ACCESSLIB_PRIVATE->capabilities)) {
         $ACCESSLIB_PRIVATE->capabilities = array();
-        $caps = $DB->get_records('capabilities', array(), 'id, name, captype, riskbitmask');
+        $caps = $DB->get_records('capabilities', array(), '', 'id, name, captype, riskbitmask');
         foreach ($caps as $cap) {
             $capname = $cap->name;
             unset($cap->id);