Skip to content

Commit

Permalink
Dev Fixed slow performance while navigating in questions
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 18, 2018
1 parent 9633598 commit 3e9d946
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/models/QuestionAttribute.php
Expand Up @@ -182,7 +182,7 @@ public function getQuestionAttributes($iQuestionID, $sLanguage = null)
return $aQuestionAttributesStatic[$iQuestionID];
}
$aQuestionAttributes = array();
$oQuestion = Question::model()->find("qid=:qid", array('qid'=>$iQuestionID)); // Maybe take parent_qid attribute before this qid attribute
$oQuestion = Question::model()->with('survey')->find("qid=:qid", array('qid'=>$iQuestionID)); // Maybe take parent_qid attribute before this qid attribute

if ($oQuestion) {
if ($sLanguage) {
Expand Down
2 changes: 1 addition & 1 deletion application/models/Survey.php
Expand Up @@ -305,7 +305,7 @@ public function relations()

public function defaultScope()
{
return array('order'=>'sid');
return array('order'=>'t.sid');
}

/** @inheritdoc */
Expand Down

0 comments on commit 3e9d946

Please sign in to comment.