Home page ajax get videos changed to count only

This commit is contained in:
Saqib Razzaq 2016-03-21 18:42:20 +05:00
parent 58518b206a
commit 24fd0882de

View file

@ -41,8 +41,10 @@
if ($load_type == 'count') { if ($load_type == 'count') {
$arr = array(); $arr = array();
$params['count_only'] = true;
$shown = $load_limit * ($cur_load_hit - 1);
$videos = get_videos($params); $videos = get_videos($params);
$vcount = count($videos); $vcount = $videos - $shown;
if ($vcount < 1) { if ($vcount < 1) {
$arr['more_vids'] = "none"; $arr['more_vids'] = "none";
echo json_encode($arr); echo json_encode($arr);