Skip to content

Commit

Permalink
dev: Now really fixing getQuestionAttributes :)
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8646 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
mennodekker committed Apr 28, 2010
1 parent 5b1e3d9 commit 5874beb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common.php
Expand Up @@ -3479,7 +3479,7 @@ function buildLabelSetCheckSumArray()
function getQuestionAttributes($qid, $type='')
{
static $cache = array();
static $availableattributes = null;
static $availableattributesarr = null;

if (isset($cache[$qid])) {
return $cache[$qid];
Expand All @@ -3494,10 +3494,10 @@ function getQuestionAttributes($qid, $type='')

//Now read available attributes, make sure we do this only once per request to save
//processing cycles and memory
if (is_null($availableattributes)) $availableattributes=questionAttributes();
if (isset($availableattributes[$type]))
if (is_null($availableattributesarr)) $availableattributesarr=questionAttributes();
if (isset($availableattributesarr[$type]))
{
$availableattributes=$availableattributes[$type];
$availableattributes=$availableattributesarr[$type];
}
else
{
Expand Down

0 comments on commit 5874beb

Please sign in to comment.