Skip to content

Commit

Permalink
Fix invalid call to Survey::getDataOnSurvey
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@11923 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Shitiz Garg committed Jan 5, 2012
1 parent d668a80 commit eceeba7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions application/controllers/admin/printablesurvey.php
Expand Up @@ -54,14 +54,13 @@ function index($surveyid, $lang = null)
// Setting the selected language for printout
$clang = new limesurvey_lang(array('lang' => $surveyprintlang));

$desrow = Survey::model()->with('languagesettings')->findByAttributes(array('sid' => $surveyid, 'language' => $surveyprintlang));

$desrow = Survey::model()->getDataOnSurvey($surveyid, $surveyprintlang)->read();

if ($desrow==false || count($desrow)==0)
{
safe_die('Invalid survey ID');
}
if (is_null($desrow))
$this->getController()->error('Invalid survey ID');

$desrow = array_merge($desrow->attributes, $desrow->languagesettings->attributes);

//echo '<pre>'.print_r($desrow,true).'</pre>';
$template = $desrow['template'];
$welcome = $desrow['surveyls_welcometext'];
Expand Down

0 comments on commit eceeba7

Please sign in to comment.