Hi,
isn’t there a problem with this line in 1.1 head revision ?
$inputCount=(int)(($this->maxRating-$this->minRating)/$this->ratingStepSize+1);
When I do something like this:
<?php $this->widget(
'CStarRating',
array(
'model'=>$data,
'attribute'=>'rating',
'name'=>'Rating['.$data->id.']',
'allowEmpty'=>false,
'starCount'=>5,
'ratingStepSize'=>0.5,
'maxRating'=>10,
'minRating'=>1,
'htmlOptions'=>array(
'class'=>'rating'
)
)
); ?>
i’m getting 6 and 1/4 stars and that is not what i expected, but when I change the line above to
$inputCount=(int)(($this->maxRating-$this->minRating+1)/$this->ratingStepSize);
everything works just fine.
I don’t know if this is a bug or I am missing something?
######################
No, there was no mistake, I have been mistaken.
I’ve corrected the line
'minRating'=>0.5
and that is realy what i expected