modified : rating function altered
This commit is contained in:
parent
7994a27dc4
commit
f612ebdada
1 changed files with 16 additions and 1 deletions
|
@ -1612,6 +1612,7 @@ class CBvideo extends CBCategory
|
||||||
$total = $params['total'];
|
$total = $params['total'];
|
||||||
$id = $params['id'];
|
$id = $params['id'];
|
||||||
$type = $params['type'];
|
$type = $params['type'];
|
||||||
|
$data_only = $params['data_only'];
|
||||||
|
|
||||||
if (empty($ratings)) {
|
if (empty($ratings)) {
|
||||||
$ratings = $params['rated_by'];
|
$ratings = $params['rated_by'];
|
||||||
|
@ -1644,7 +1645,21 @@ class CBvideo extends CBCategory
|
||||||
$rating_msg = '<span class="msg">'.$rating_msg[0].'</span>';
|
$rating_msg = '<span class="msg">'.$rating_msg[0].'</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($data_only){
|
||||||
|
$data = array(
|
||||||
|
'perc'=>$perc,
|
||||||
|
'disperc'=>$disperc,
|
||||||
|
'id'=>$id,
|
||||||
|
'type'=>$type,
|
||||||
|
'id'=>$id,
|
||||||
|
'rating_msg'=>$rating_msg,
|
||||||
|
'likes'=>$likes,
|
||||||
|
'dislikes'=>($ratings-$likes),
|
||||||
|
'disable'=>$params['disable']
|
||||||
|
);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
assign('perc',$perc);
|
assign('perc',$perc);
|
||||||
assign('disperc',$disperc);
|
assign('disperc',$disperc);
|
||||||
assign('id',$id);
|
assign('id',$id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue