Fixed issue : All playlists would show on watch video page
Changes made in functions.php: check if userid is passed in paramters. If yes, get user only videos, else get all Changes made in watch_video.html: Pass user id to function show_playlist_form()
This commit is contained in:
parent
6ce2c6fea3
commit
fcc79f601b
2 changed files with 17 additions and 4 deletions
|
@ -2373,14 +2373,27 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Function used to show flag form
|
||||
*/
|
||||
* Function used to show flag form
|
||||
* @param : { array } { $array } { array of parameters }
|
||||
*/
|
||||
|
||||
function show_playlist_form($array)
|
||||
{
|
||||
global $cbvid;
|
||||
assign('params',$array);
|
||||
|
||||
$playlists = $cbvid->action->get_playlists();
|
||||
// decides to show all or user only playlists
|
||||
// depending on the parameters passed to it
|
||||
|
||||
if (!empty($array['user']))
|
||||
{
|
||||
$playlists = $cbvid->action->get_playlists($array);
|
||||
}
|
||||
else
|
||||
{
|
||||
$playlists = $cbvid->action->get_playlists();
|
||||
}
|
||||
|
||||
assign('playlists',$playlists);
|
||||
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
</div>
|
||||
|
||||
<div class="alert ">
|
||||
{show_playlist_form id=$vdo.videoid type=video}
|
||||
{show_playlist_form id=$vdo.videoid user=userid() type=video}
|
||||
</div>
|
||||
{if userid()}
|
||||
<div class="alert ">
|
||||
|
|
Loading…
Add table
Reference in a new issue