diff --git a/upload/includes/classes/video.class.php b/upload/includes/classes/video.class.php index 975df37d..acd3ea31 100644 --- a/upload/includes/classes/video.class.php +++ b/upload/includes/classes/video.class.php @@ -680,7 +680,7 @@ class CBvideo extends CBCategory assign($params['assign'],$result); } - + if($params['pr']) pr($result,true); if($params['count_only']) return $result = $db->count(tbl('video'),'*',$cond); if($params['assign']) diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 60fe9803..7cefa8df 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2612,7 +2612,10 @@ function video_playable($id) { global $cbvideo,$userquery; + if(!is_array($id)) $vdo = $cbvideo->get_video($id); + else + $vdo = $id; $uid = userid(); if(!$vdo) { diff --git a/upload/styles/cbv2new/layout/blocks/watch_video/video_box.html b/upload/styles/cbv2new/layout/blocks/watch_video/video_box.html index d4ae530d..5726fbb6 100644 --- a/upload/styles/cbv2new/layout/blocks/watch_video/video_box.html +++ b/upload/styles/cbv2new/layout/blocks/watch_video/video_box.html @@ -12,8 +12,7 @@ {$video.title|truncate:30}
{lang code='views'}: {$video.views|number_format}
-{assign var='vid_username' value=$userquery->get_user_field_only($video.userid,'username')} -{$vid_username|truncate:12} +{$video.username} diff --git a/upload/watch_video.php b/upload/watch_video.php index f75da58b..9689e4d8 100644 --- a/upload/watch_video.php +++ b/upload/watch_video.php @@ -15,10 +15,11 @@ $pages->page_redir(); //Getting Video Key $vkey = @$_GET['v']; +$vdo = $cbvid->get_video($vkey); -if(video_playable($vkey)) +if(video_playable($vdo)) { - $vdo = $cbvid->get_video($vkey); + //Checking for playlist $pid = $_GET['play_list'];