mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Refactor and cleanup.
This commit is contained in:
parent
f6eeb9aa32
commit
7f32486ea3
138 changed files with 1201 additions and 1105 deletions
|
@ -57,20 +57,20 @@ foreach ($videos as $key => $value) {
|
|||
$videos[$key]['comments'][$key2]['userName'] = $user->getNameIdentificationBd();
|
||||
}
|
||||
$videos[$key]['subscribers'] = Subscribe::getTotalSubscribes($videos[$key]['users_id']);
|
||||
|
||||
|
||||
$videos[$key]['firstVideo'] = "";
|
||||
foreach ($videos[$key]['VideoUrl'] as $value2) {
|
||||
if($value2["type"] === 'video'){
|
||||
$videos[$key]['firstVideo'] = $value2["url"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(preg_match("/^videos/", $videos[$key]['photoURL'])){
|
||||
$videos[$key]['UserPhoto'] = "{$global['webSiteRootURL']}".$videos[$key]['photoURL'];
|
||||
}else{
|
||||
$videos[$key]['UserPhoto'] = $videos[$key]['photoURL'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($videos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue