mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +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;
|
global $global;
|
||||||
if (!static::isTableInstalled()) {
|
if (!static::isTableInstalled()) {
|
||||||
return false;
|
return array();
|
||||||
}
|
}
|
||||||
$sql = "SELECT * FROM " . static::getTableName() . " WHERE 1=1 ";
|
$sql = "SELECT * FROM " . static::getTableName() . " WHERE 1=1 ";
|
||||||
|
|
||||||
|
|
|
@ -313,6 +313,11 @@ class sqlDAL
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($refreshCache){
|
||||||
|
$random = uniqid();
|
||||||
|
$preparedStatement .= " /* {$random} */ ";
|
||||||
|
}
|
||||||
|
|
||||||
$wasSTMTError = false;
|
$wasSTMTError = false;
|
||||||
// need to add dechex because some times it return an negative value and make it fails on javascript playlists
|
// need to add dechex because some times it return an negative value and make it fails on javascript playlists
|
||||||
$crc = (md5($preparedStatement . implode($values)));
|
$crc = (md5($preparedStatement . implode($values)));
|
||||||
|
|
|
@ -52,6 +52,10 @@ try {
|
||||||
} else {
|
} else {
|
||||||
tryToPlayMuted(currentTime);
|
tryToPlayMuted(currentTime);
|
||||||
}
|
}
|
||||||
|
} else if (e.data.avideoModalIframeFull) {
|
||||||
|
avideoModalIframeFull(e.data.avideoModalIframeFull);
|
||||||
|
} else if (e.data.avideoModalIframe) {
|
||||||
|
avideoModalIframe(e.data.avideoModalIframe);
|
||||||
} else {
|
} else {
|
||||||
//console.log('eventer messageEvent', e.data);
|
//console.log('eventer messageEvent', e.data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue