Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LimeSurvey/LimeSurvey
Browse files Browse the repository at this point in the history
  • Loading branch information
limesurvey-translations committed Mar 2, 2020
2 parents b81fcce + f28d843 commit a6c787f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/questions.php
Expand Up @@ -1116,7 +1116,7 @@ public function delete($surveyid=null, $qid=null, $gid = 0, $massAction = false)
];
}

$redirect = Yii::app()->createUrl('admin/survey/sa/listquestions/', ['surveyid' => $surveyid, 'gid' => $gid_search]);
$redirect = Yii::app()->createUrl('admin/survey/sa/listquestions/', ['surveyid' => $surveyid]);
if (Yii::app()->request->isAjaxRequest) {
$this->renderJSON(
[
Expand Down
9 changes: 5 additions & 4 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -677,7 +677,7 @@ private function setArgs()

if ($this->aSurveyInfo['refurl'] == "Y") {
//Only add this if it doesn't already exist
if (!in_array("refurl", $_SESSION[$this->LEMsessid]['insertarray'])) {
if ($this->LEMsessid && !in_array("refurl", $_SESSION[$this->LEMsessid]['insertarray'])) {
$_SESSION[$this->LEMsessid]['insertarray'][] = "refurl";
}
}
Expand Down Expand Up @@ -1398,6 +1398,7 @@ private function setVarFromArgs($args)
$this->LEMskipReprocessing = isset($LEMskipReprocessing) ? $LEMskipReprocessing : null;
$this->thissurvey = isset($thissurvey) ? $thissurvey : null;
$this->iSurveyid = isset($surveyid) ? $surveyid : null;
$this->LEMsessid = $this->iSurveyid ? 'survey_'.$this->iSurveyid: null;
$this->aSurveyOptions = isset($surveyOptions) ? $surveyOptions : null;
$this->aMoveResult = isset($moveResult) ? $moveResult : null;
$this->sMove = isset($move) ? $move : null;
Expand Down Expand Up @@ -1695,18 +1696,18 @@ private function makeLanguageChanger()
* This method will set survey values in public property of the class
* So, any value here set as $this->xxx will be available as $xxx after :
* eg: $this->LEMsessid
*
* @param integer $surveyid;
* @param array $args;
*/
private function setSurveySettings($surveyid, $args)
{
$this->setVarFromArgs($args); // Set the private variable from $args
$this->setVarFromArgs(array_merge($args, array('surveyid' => $surveyid))); // Set the private variable from $args, be sure to set surveyid
$this->initTemplate(); // Template settings
$this->setJavascriptVar();
$this->setArgs();

extract($args);

$this->LEMsessid = 'survey_'.$this->iSurveyid;
$this->aSurveyInfo = getSurveyInfo($this->iSurveyid, App()->getLanguage());
$this->aSurveyInfo['surveyUrl'] = App()->createUrl("/survey/index", array("sid"=>$this->iSurveyid));

Expand Down

0 comments on commit a6c787f

Please sign in to comment.