Skip to content

Commit

Permalink
Merge branch '2.1' of github.com:LimeSurvey/LimeSurvey into 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Dec 14, 2012
2 parents a01d1eb + 818cf9a commit 038433c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/surveyadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,9 @@ public function getSurveys_json()
else
{
$condition = "sid={$rows['sid']} AND language='" . $rows['language'] . "'";
$questionsCountResult = Questions::model()->findAll($condition);
$questionsCountResult = Questions::model()->count($condition);

if (count($questionsCountResult) && hasSurveyPermission($rows['sid'], 'surveyactivation', 'update'))
if ($questionsCountResult>0 && hasSurveyPermission($rows['sid'], 'surveyactivation', 'update'))
{
$aSurveyEntry[] = '<!--e--><a href="' . $this->getController()->createUrl('admin/survey/sa/activate/surveyid/' . $rows['sid']) . '"><img src="' . Yii::app()->getConfig('adminimageurl') . 'inactive.png" title="" alt="' . $clang->gT("This survey is currently not active - click here to activate this survey.") . '" /></a>';
}
Expand Down

0 comments on commit 038433c

Please sign in to comment.