Fixed : Watch video DB queries

This commit is contained in:
Arslan Hassan 2011-01-25 13:23:03 +00:00
parent ed0b2eda42
commit cab4042f5a
4 changed files with 8 additions and 5 deletions

View file

@ -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'])

View file

@ -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)
{

View file

@ -12,8 +12,7 @@
<a href="{videoLink vdetails=$video}">{$video.title|truncate:30}</a><br>
{lang code='views'}: {$video.views|number_format}<br>
{assign var='vid_username' value=$userquery->get_user_field_only($video.userid,'username')}
<a href="{$userquery->profile_link($video.userid)}" title="{$vid_username}" alt="{$vid_username}">{$vid_username|truncate:12}</a>
<a href="{$userquery->profile_link($video)}" title="{$video.username}" alt="{$video.username}">{$video.username}</a>
</div>
<!--VIDEO_THUMB END-->

View file

@ -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'];