Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed May 28, 2018
2 parents e81ef6b + 950a901 commit 7243b0c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/themeoptions.php
Expand Up @@ -116,7 +116,7 @@ public function updatesurvey($sid)
$this->_updateCommon($model, $sid);
} else {
Yii::app()->setFlashMessage(gT("We are sorry but you don't have permissions to do this."), 'error');
$this->getController()->redirect(Yii::app()->getController()->createUrl("/admin/themeoptions/sa/updatesurvey", ['surveyid'=>$sid, 'sid'=>$sid]));
$this->getController()->redirect(array('admin/survey/sa/view/surveyid/'.$sid));
}
}

Expand Down
1 change: 1 addition & 0 deletions application/helpers/admin/import_helper.php
Expand Up @@ -1931,6 +1931,7 @@ function XMLImportSurvey($sFullFilePath, $sXMLdata = null, $sNewSurveyName = nul
foreach ($row as $key=>$value) {
$insertdata[(string) $key] = (string) $value;
}
$insertdata['autoload_url'] = 0; // used to bypass urlValidator check in QuotaLanguageSetting model
$insertdata['quotals_quota_id'] = $aQuotaReplacements[(int) $insertdata['quotals_quota_id']]; // remap the qid
unset($insertdata['quotals_id']);
$quotaLanguagesSetting = new QuotaLanguageSetting();
Expand Down
8 changes: 6 additions & 2 deletions application/models/QuotaLanguageSetting.php
Expand Up @@ -102,8 +102,12 @@ public function insertRecords($data)
{
$settings = new self;
foreach ($data as $k => $v) {
$settings->$k = $v;
}
if ($k === 'autoload_url'){
$settings->quota->autoload_url = $v;
} else {
$settings->$k = $v;
}
}
return $settings->save();
}
}

0 comments on commit 7243b0c

Please sign in to comment.