Skip to content

Commit

Permalink
Dev: removed SurveyRuntimeHelper::$content
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 10, 2017
1 parent 4eb8580 commit 26ccd7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -31,7 +31,7 @@ class SurveyRuntimeHelper {

// Template datas
private $oTemplate; // Template configuration object (set in model TemplateConfiguration)
private $sTemplateViewPath; // Path of the PSTPL files in template
private $sTemplateViewPath; // Path of the layout files in template

// LEM Datas
private $LEMsessid;
Expand Down Expand Up @@ -74,7 +74,6 @@ class SurveyRuntimeHelper {

// strings
private $completed; // The string containing the completed message
private $content; // The content... It contains the result of the different templatereplace (so all the replacement of the pstpl files)
private $blocks; // Divs containing the HTML generated by plugins trying to override quanda_helper

// Boolean helpers
Expand Down Expand Up @@ -437,8 +436,8 @@ public function run($surveyid,$args)

if (!$previewgrp && !$previewquestion){
$thissurvey['aNavigator'] = getNavigatorDatas();
$thissurvey['hiddenInputs'] = "<input type='hidden' name='thisstep' value='{$_SESSION[$LEMsessid]['step']}' id='thisstep' />\n";
$thissurvey['hiddenInputs'] .= "<input type='hidden' name='sid' value='$surveyid' id='sid' />\n";
$thissurvey['hiddenInputs'] = "<input type='hidden' name='thisstep' value='{$_SESSION[$LEMsessid]['step']}' id='thisstep' />\n";
$thissurvey['hiddenInputs'] .= "<input type='hidden' name='sid' value='$surveyid' id='sid' />\n";
$thissurvey['hiddenInputs'] .= "<input type='hidden' name='start_time' value='" . time() . "' id='start_time' />\n";
$_SESSION[$LEMsessid]['LEMpostKey'] = mt_rand();
$thissurvey['hiddenInputs'] .= "<input type='hidden' name='LEMpostKey' value='{$_SESSION[$LEMsessid]['LEMpostKey']}' id='LEMpostKey' />\n";
Expand Down Expand Up @@ -594,7 +593,6 @@ private function getArgs()
'invalidSQList' => $this->invalidSQList ,
'filenotvalidated' => $this->filenotvalidated ,
'completed' => $this->completed ,
'content' => $this->content ,
'blocks' => $this->blocks ,
'notvalidated' => $this->notvalidated ,
'LEMsessid' => $this->LEMsessid ,
Expand Down Expand Up @@ -1320,7 +1318,6 @@ private function setVarFromArgs($args)
$this->invalidSQList = isset( $invalidSQList )?$invalidSQList :null ;
$this->filenotvalidated = isset( $filenotvalidated )?$filenotvalidated :null ;
$this->completed = isset( $completed )?$completed :null ;
$this->content = isset( $content )?$content :null ;
$this->blocks = isset( $blocks )?$blocks :null ;
$this->notvalidated = isset( $notvalidated )?$notvalidated :null;
}
Expand Down
2 changes: 1 addition & 1 deletion application/models/TemplateConfiguration.php
Expand Up @@ -82,7 +82,7 @@ class TemplateConfiguration extends CFormModel
* If it's a user template, it will check if it's an old 2.0x template to provide default configuration values corresponding to the old template system
* If it's not an old template, it will check if it has a configuration file to load its datas.
* If it's not the case (template probably doesn't exist), it will load the default template configuration
* TODO : more tests should be done, with a call to private function _is_valid_template(), testing not only if it has a config.xml, but also id this file is correct, if it has the needed pstpl files, if the files refered in css exist, etc.
* TODO : more tests should be done, with a call to private function _is_valid_template(), testing not only if it has a config.xml, but also id this file is correct, if it has the needed layout files, if the files refered in css exist, etc.
*
* @param string $sTemplateName the name of the template to load. The string come from the template selector in survey settings
* @param string $iSurveyId the id of the survey. If
Expand Down

0 comments on commit 26ccd7b

Please sign in to comment.