Skip to content

Commit

Permalink
DEV: remove/deprecate insertRecords() : QuotaLanguageSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Feb 3, 2018
1 parent 59e625f commit fcfec85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/helpers/admin/import_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,11 @@ function XMLImportSurvey($sFullFilePath, $sXMLdata = null, $sNewSurveyName = nul
}
$insertdata['quotals_quota_id'] = $aQuotaReplacements[(int) $insertdata['quotals_quota_id']]; // remap the qid
unset($insertdata['quotals_id']);
$result = QuotaLanguageSetting::model()->insertRecords($insertdata) or safeDie(gT("Error").": Failed to insert data<br />");
$quotaLanguagesSetting = new QuotaLanguageSetting();
$quotaLanguagesSetting->attributes = $insertdata;
if (!$quotaLanguagesSetting->save()) {
safeDie(gT("Error").": Failed to insert data<br />");
}
$results['quotals']++;
}
}
Expand Down
5 changes: 5 additions & 0 deletions application/models/QuotaLanguageSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public function attributeLabels()
);
}

/**
* @param $data
* @return bool
* @deprecated at 2018-02-03 use $model->attributes = $data && $model->save()
*/
public function insertRecords($data)
{
$settings = new self;
Expand Down

0 comments on commit fcfec85

Please sign in to comment.