MDL-31876 questionlib: fix question_has_capability_on memory bloat
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
a9b03dc661
commit
8d11716bfc
+1
-1
@@ -1306,7 +1306,7 @@ function question_has_capability_on($question, $cap, $cachecat = -1) {
|
||||
static $categories = array();
|
||||
static $cachedcat = array();
|
||||
if ($cachecat != -1 && array_search($cachecat, $cachedcat) === false) {
|
||||
$questions += $DB->get_records('question', array('category' => $cachecat));
|
||||
$questions += $DB->get_records('question', array('category' => $cachecat), '', 'id,category,createdby');
|
||||
$cachedcat[] = $cachecat;
|
||||
}
|
||||
if (!is_object($question)) {
|
||||
|
||||
Reference in New Issue
Block a user