Skip to content

Commit

Permalink
Dev: Quote table name for postgres in assessments
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt authored and eddylackmann committed Feb 17, 2020
1 parent c4520da commit 1fa1476
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/admin/assessments.php
Expand Up @@ -254,10 +254,14 @@ private function _activateAsessement($iSurveyID)
private function _collectGroupData($oSurvey, &$aData = array())
{
$aGroups = [];
$db = Yii::app()->db;
$quotedQGL10ns = $db->quoteTableName('questionGroupL10ns');
$quotedLanguage = $db->quoteColumnName('language');

$groups = QuestionGroup::model()->with(
[
'questionGroupL10ns' => [
'condition' => 'questionGroupL10ns.language = :language',
'condition' => $quotedQGL10ns . '.' . $quotedLanguage . ' = :language',
'params' => array(':language' => $oSurvey->language)
]
]
Expand Down

0 comments on commit 1fa1476

Please sign in to comment.