Skip to content

Commit

Permalink
Fix count call
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@11827 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Shitiz Garg committed Jan 1, 2012
1 parent 28c2769 commit 2f1fbde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/useraction.php
Expand Up @@ -47,7 +47,7 @@ public function index()
unset($userlist[0]);

if (Yii::app()->session['USER_RIGHT_SUPERADMIN'] == 1) {
$noofsurveys = Survey::model()->count(array("owner_id" => $usrhimself['uid']));
$noofsurveys = Survey::model()->countByAttributes(array("owner_id" => $usrhimself['uid']));
$data['noofsurveys'] = $noofsurveys;
}

Expand Down Expand Up @@ -78,7 +78,7 @@ public function index()

private function _getSurveyCountForUser(array $user)
{
return Survey::model()->count(array('owner_id' => $user['uid']));
return Survey::model()->countByAttributes(array('owner_id' => $user['uid']));
}

function adduser()
Expand Down

0 comments on commit 2f1fbde

Please sign in to comment.