1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00
This commit is contained in:
Daniel Neto 2024-01-23 10:12:37 -03:00
parent f28b528a21
commit a4ff188110
3 changed files with 19 additions and 4 deletions

View file

@ -4,6 +4,7 @@ global $t;
// filter some security here
if (!empty($_GET['lang'])) {
$_GET['lang'] = str_replace(["'", '"', """, "'"], ['', '', '', ''], xss_esc($_GET['lang']));
$_GET['lang'] = preg_replace('/[^a-z0-9\._-]/i', '', $_GET['lang']);
}
includeLangFile();

View file

@ -60,7 +60,7 @@ foreach ($rows as $key => $value) {
$pl = new PlayList($ps->playlists_id);
$title = $pl->getName() . ' [' . $ps->msg . ']';
$title = '';
_error_log("Playlist rebroadcast active {$value['id']}");
_error_log("Playlist rebroadcast active id={$value['id']} videos_id={$ps->current_videos_id} [total=".count($rows)."]");
$response = Rebroadcaster::rebroadcastVideo($ps->current_videos_id, $pl->getUsers_id(), Playlists_schedules::getPlayListScheduledIndex($value['id']), $title);
//var_dump($response, $ps);
}

View file

@ -294,12 +294,26 @@ if (empty($video)) {
$vid->save();
_error_log('Missing files recovered ' . $_GET['v']);
} else {
videoNotFound('ERROR 1: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()]);
$msg = 'ERROR 1: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()];
if(User::isLogged()){
gotToLoginAndComeBackHere($msg);
}else{
videoNotFound($msg);
}
exit;
}
} else if ($vid->getStatus() === Video::$statusUnpublished) {
videoNotFound('This video is currently unpublished. Please contact an administrator to review and approve it for publication. Thank you for your patience and understanding.');
$msg = 'This video is currently unpublished. Please contact an administrator to review and approve it for publication. Thank you for your patience and understanding.';
videoNotFound($msg);
exit;
} else {
videoNotFound('ERROR 2: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()]);
$msg = 'ERROR 2: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()];
if(User::isLogged()){
gotToLoginAndComeBackHere($msg);
}else{
videoNotFound($msg);
}
exit;
}
} else {
videoNotFound('ERROR 3: The video is not available video ID is empty');