diff --git a/application/controllers/admin/themeoptions.php b/application/controllers/admin/themeoptions.php index 3cc8fdc1f61..552c51c162c 100644 --- a/application/controllers/admin/themeoptions.php +++ b/application/controllers/admin/themeoptions.php @@ -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)); } } diff --git a/application/helpers/admin/import_helper.php b/application/helpers/admin/import_helper.php index aa5bd6434c4..55dc626afbe 100644 --- a/application/helpers/admin/import_helper.php +++ b/application/helpers/admin/import_helper.php @@ -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(); diff --git a/application/models/QuotaLanguageSetting.php b/application/models/QuotaLanguageSetting.php index 5fcffba1205..94630f5be8a 100644 --- a/application/models/QuotaLanguageSetting.php +++ b/application/models/QuotaLanguageSetting.php @@ -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(); } }