Skip to content

Commit

Permalink
dev: refactor wrong naming of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Trischi80 authored and olleharstedt committed May 28, 2021
1 parent 53773e4 commit 85857c9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions application/controllers/admin/globalsettings.php
Expand Up @@ -440,20 +440,20 @@ public function surveySettings()
{
$bRedirect = 0;
$gsid = 0; // global setting in SurveysGroupsettings model
$oSurvey = SurveysGroupsettings::model()->findByPk($gsid);
$oSurvey->setOptions();
$oSurveyGroupSetting = SurveysGroupsettings::model()->findByPk($gsid);
$oSurveyGroupSetting->setOptions();

$sPartial = Yii::app()->request->getParam('partial', '_generaloptions_panel');

if (isset($_POST)) {
$oSurvey->attributes = $_POST;
$oSurvey->gsid = 0;
$oSurvey->usecaptcha = Survey::saveTranscribeCaptchaOptions();
$oSurveyGroupSetting->attributes = $_POST;
$oSurveyGroupSetting->gsid = 0;
$oSurveyGroupSetting->usecaptcha = Survey::saveTranscribeCaptchaOptions();

//todo: when changing ipanonymiez from "N" to "Y", call the function that anonymizes the ip-addresses


if ($oSurvey->save()) {
if ($oSurveyGroupSetting->save()) {
$bRedirect = 1;
}
}
Expand All @@ -466,7 +466,7 @@ public function surveySettings()
// Sort users by name
asort($aData['users']);

$aData['oSurvey'] = $oSurvey;
$aData['oSurvey'] = $oSurveyGroupSetting;

if ($bRedirect && App()->request->getPost('saveandclose') !== null) {
$this->getController()->redirect($this->getController()->createUrl('admin/index'));
Expand Down

0 comments on commit 85857c9

Please sign in to comment.