Skip to content

Commit

Permalink
#06992 Issue Fixed
Browse files Browse the repository at this point in the history
http://bugs.limesurvey.org/view.php?id=6992#c22803

06992: After registering for a token based survey - the next page is missing template css
The {TEMPLATECSS} placeholder is not being parsed.
  • Loading branch information
ravindrakhokharia committed Dec 3, 2012
1 parent 1a4c840 commit d6fd322
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions application/controllers/RegisterController.php
Expand Up @@ -257,20 +257,23 @@ function actionIndex($surveyid = null)
sendCacheHeaders();
doHeader();
Yii::app()->lang = $clang;
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
foreach(file("$thistpl/survey.pstpl") as $op)
{
echo "\t".templatereplace($op);
}
// fetch the defined variables and pass it to the header footer templates.
$redata = compact(array_keys(get_defined_vars()));
$this->_printTemplateContent($thistpl.'/startpage.pstpl', $redata, __LINE__);
$this->_printTemplateContent($thistpl.'/survey.pstpl', $redata, __LINE__);
echo $html;
foreach(file("$thistpl/endpage.pstpl") as $op)
{
echo templatereplace($op);
}
$this->_printTemplateContent($thistpl.'/endpage.pstpl', $redata, __LINE__);

doFooter();
}

/**
* function will parse the templates data
* @return displays the requested template
*/
function _printTemplateContent($sTemplateFile, &$redata, $iDebugLine = -1)
{
echo templatereplace(file_get_contents($sTemplateFile),array(),$redata,'survey['.$iDebugLine.']');
}

}

0 comments on commit d6fd322

Please sign in to comment.