From 9f1017a0be550b9a20e733ae3dbde904e3ac35fb Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Thu, 16 Aug 2007 05:19:33 +0000 Subject: [PATCH] correct logic error that broke caching. --- lib/questionlib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/questionlib.php b/lib/questionlib.php index e9abc60b2f..68707d3da5 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -1910,11 +1910,10 @@ function question_has_capability_on($question, $cap, $cachecat = -1){ // these are capabilities on existing questions capabilties are //set per category. Each of these has a mine and all version. Append 'mine' and 'all' $question_questioncaps = array('edit', 'view', 'use', 'move'); - static $questions = array(); static $categories = array(); static $cachedcat = array(); - if ($cachecat != -1 && (array_search($cachecat, $cachedcat)!==FALSE)){ + if ($cachecat != -1 && (array_search($cachecat, $cachedcat)===FALSE)){ $questions += get_records('question', 'category', $cachecat); $cachedcat[] = $cachecat; } -- 2.39.5