mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
This commit is contained in:
parent
44e9ee4a55
commit
678c7bbe2b
1 changed files with 9 additions and 0 deletions
|
@ -1076,6 +1076,13 @@ class AVideoPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function showAds($videos_id) {
|
public static function showAds($videos_id) {
|
||||||
|
global $_showAds;
|
||||||
|
if(!isset($_showAds)){
|
||||||
|
$_showAds = array();
|
||||||
|
}
|
||||||
|
if(isset($_showAds[$videos_id])){
|
||||||
|
return $_showAds[$videos_id];
|
||||||
|
}
|
||||||
$plugins = Plugin::getAllEnabled();
|
$plugins = Plugin::getAllEnabled();
|
||||||
$resp = true;
|
$resp = true;
|
||||||
foreach ($plugins as $value) {
|
foreach ($plugins as $value) {
|
||||||
|
@ -1085,11 +1092,13 @@ class AVideoPlugin {
|
||||||
$showAds = $p->showAds($videos_id);
|
$showAds = $p->showAds($videos_id);
|
||||||
if (!$showAds) {
|
if (!$showAds) {
|
||||||
_error_log("showAds: {$value['dirName']} said NOT to show ads on {$videos_id}");
|
_error_log("showAds: {$value['dirName']} said NOT to show ads on {$videos_id}");
|
||||||
|
$_showAds[$videos_id] = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self::YPTend("{$value['dirName']}::" . __FUNCTION__);
|
self::YPTend("{$value['dirName']}::" . __FUNCTION__);
|
||||||
}
|
}
|
||||||
|
$_showAds[$videos_id] = $resp;
|
||||||
return $resp;
|
return $resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue