1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Refactor return value in ObjectYPT to an empty array for better handling of uninstalled tables; add cache refresh identifier in sqlDAL; improve code formatting and readability in channelBody and script.js

This commit is contained in:
Daniel Neto 2025-05-03 12:20:57 -03:00
parent 093764f044
commit db715b0bae
4 changed files with 23 additions and 14 deletions

View file

@ -99,7 +99,7 @@ abstract class ObjectYPT implements ObjectInterface
{
global $global;
if (!static::isTableInstalled()) {
return false;
return array();
}
$sql = "SELECT * FROM " . static::getTableName() . " WHERE 1=1 ";

View file

@ -313,6 +313,11 @@ class sqlDAL
return false;
}
if($refreshCache){
$random = uniqid();
$preparedStatement .= " /* {$random} */ ";
}
$wasSTMTError = false;
// need to add dechex because some times it return an negative value and make it fails on javascript playlists
$crc = (md5($preparedStatement . implode($values)));

View file

@ -52,6 +52,10 @@ try {
} else {
tryToPlayMuted(currentTime);
}
} else if (e.data.avideoModalIframeFull) {
avideoModalIframeFull(e.data.avideoModalIframeFull);
} else if (e.data.avideoModalIframe) {
avideoModalIframe(e.data.avideoModalIframe);
} else {
//console.log('eventer messageEvent', e.data);
}