Skip to content

Commit

Permalink
Fixed issue #10644: Groups report members incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 3, 2016
1 parent 7c52350 commit 8f44c92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions application/models/UserGroup.php
Expand Up @@ -213,6 +213,11 @@ function deleteGroup($ugid, $ownerid)
return true;
}

public function getCountUsers()
{
return count($this->users);
}

public function getbuttons()
{

Expand Down
12 changes: 6 additions & 6 deletions application/views/admin/usergroup/usergroups_view.php
Expand Up @@ -8,9 +8,9 @@
?>
<?php $pageSize=Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']);?>
<div class="col-lg-12">
<h3><?php eT('User groups list'); ?></h3>
<h3><?php eT('User groups list'); ?></h3>

<div class="row">
<div class="row">
<div class="col-lg-12 content-right">
<?php
$this->widget('bootstrap.widgets.TbGridView', array(
Expand All @@ -26,7 +26,7 @@

'columns' => array(

array(
array(
'header' => gT('User group ID'),
'name' => 'usergroup_id',
'value'=>'$data->ugid',
Expand All @@ -37,7 +37,7 @@
'header' => gT('Name'),
'name' => 'name',
'value'=>'$data->name',
'htmlOptions' => array('class' => 'col-md-1'),
'htmlOptions' => array('class' => 'col-md-2'),
),

array(
Expand All @@ -58,7 +58,7 @@
array(
'header' => gT('Members'),
'name' => 'members',
'value'=> 'count($data->Users)',
'value'=> '$data->countUsers',
'htmlOptions' => array('class' => 'col-md-1'),
),

Expand Down Expand Up @@ -95,4 +95,4 @@
});
});
});
</script>
</script>

0 comments on commit 8f44c92

Please sign in to comment.