Skip to content

Commit

Permalink
Fixed issue #6991: Review anonymous survey
Browse files Browse the repository at this point in the history
Dev: actually, only in templatereplace, verify $anonymized param in the function.Fixed issue
  • Loading branch information
Shnoulle committed Dec 1, 2012
1 parent 31a40fe commit ea9018f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/helpers/replacements_helper.php
Expand Up @@ -119,6 +119,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
}
if(!isset($templatedir)) $templatedir = getTemplatePath($templatename);
if(!isset($templateurl)) $templateurl = getTemplateURL($templatename)."/";
if (!$anonymized && isset($thissurvey['anonymized'])) $anonymized=($thissurvey['anonymized']=="Y");

// TEMPLATECSS and TEMPLATEJS
$_templatecss="";$_templatejs="";
Expand Down Expand Up @@ -854,7 +855,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
$coreReplacements['TEMPLATEJS'] = $_templatejs;
$coreReplacements['TEMPLATEURL'] = $templateurl;
$coreReplacements['THEREAREXQUESTIONS'] = $_therearexquestions;
if (!$anonymized) $coreReplacements['TOKEN'] = $_token;
$coreReplacements['TOKEN'] = (!$anonymized ? $_token : '');// Silently replace TOKEN by empty string
$coreReplacements['URL'] = $_linkreplace;
$coreReplacements['WELCOME'] = (isset($thissurvey['welcome']) ? $thissurvey['welcome'] : '');

Expand Down

0 comments on commit ea9018f

Please sign in to comment.