Skip to content

Commit

Permalink
Fixed issue: Public statistics always uses default template
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Jan 11, 2013
1 parent 0b824f9 commit ddab280
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions application/controllers/Statistics_userController.php
Expand Up @@ -238,6 +238,8 @@ function actionAction($surveyid,$sLanguage)
$aData['sTemplatePath'] = validateTemplateDir($aSurveyInfo['templatedir']);
}

$redata = compact(array_keys(get_defined_vars()));
$data['redata'] = $redata;
header_includes('statistics_user.js');
$this->render('/statistics_user_view',$aData);

Expand Down
4 changes: 2 additions & 2 deletions application/views/statistics_user_view.php
@@ -1,6 +1,6 @@
<?php
doHeader();
echo templatereplace(file_get_contents(getTemplatePath(validateTemplateDir($sTemplatePath))."/startpage.pstpl"));
echo templatereplace(file_get_contents(getTemplatePath(validateTemplateDir($sTemplatePath))."/startpage.pstpl"), array(), $redata);
?>
<script type='text/javascript'>
var graphUrl="<?php echo Yii::app()->getController()->createUrl("admin/statistics/sa/graph"); ?>";
Expand All @@ -13,6 +13,6 @@
<?php if (isset($statisticsoutput) && $statisticsoutput) { echo $statisticsoutput; } ?><br />
</div>
<?php
echo templatereplace(file_get_contents(getTemplatePath(validateTemplateDir($sTemplatePath))."/endpage.pstpl"));
echo templatereplace(file_get_contents(getTemplatePath(validateTemplateDir($sTemplatePath))."/endpage.pstpl"), array(), $redata);
?>

0 comments on commit ddab280

Please sign in to comment.