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:
parent
093764f044
commit
db715b0bae
4 changed files with 23 additions and 14 deletions
|
@ -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 ";
|
||||
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue