1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
Daniel Neto 2023-03-13 19:49:40 -03:00
parent 62bebd4afd
commit f06fc95e0f
12 changed files with 281 additions and 36 deletions

View file

@ -15,10 +15,12 @@ if ($users_id = isChannel()) {
$imgw = 200; $imgw = 200;
$imgh = 200; $imgh = 200;
$category = Category::getCategoryByName($_GET['catName']); $category = Category::getCategoryByName($_GET['catName']);
if(!empty($category)){
$img = Category::getOGImage($category['id']); $img = Category::getOGImage($category['id']);
$title = html2plainText($category['name']); $title = html2plainText($category['name']);
$url = Category::getCategoryLinkFromName($_GET['catName']); $url = Category::getCategoryLinkFromName($_GET['catName']);
$description = html2plainText($category['description']); $description = html2plainText($category['description']);
}
echo PHP_EOL."<!-- OpenGraph not video 1 -->".PHP_EOL; ?> echo PHP_EOL."<!-- OpenGraph not video 1 -->".PHP_EOL; ?>
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:site_name" content="<?php echo $title; ?>"> <meta property="og:site_name" content="<?php echo $title; ?>">

View file

@ -5399,6 +5399,10 @@ function _dieAndLogObject($obj, $prefix = "")
function isAVideoPlayer() function isAVideoPlayer()
{ {
global $global;
if (!empty($global['doNotLoadPlayer'])) {
return false;
}
if (isVideo() || isSerie()) { if (isVideo() || isSerie()) {
return true; return true;
} }
@ -5677,7 +5681,8 @@ function getSelfURI()
$phpselfWithoutIndex = preg_replace("/index.php/", "", @$_SERVER['PHP_SELF']); $phpselfWithoutIndex = preg_replace("/index.php/", "", @$_SERVER['PHP_SELF']);
$url = $http . "://$_SERVER[HTTP_HOST]$phpselfWithoutIndex?$queryString"; $url = $http . "://$_SERVER[HTTP_HOST]$phpselfWithoutIndex?$queryString";
$url = rtrim($url, '?'); $url = rtrim($url, '?');
return $url;
return fixTestURL($url);
} }
function isSameVideoAsSelfURI($url) function isSameVideoAsSelfURI($url)
@ -9293,6 +9298,7 @@ function getURL($relativePath, $ignoreCDN = false)
$_SESSION['user']['sessionCache']['getURL'] = []; $_SESSION['user']['sessionCache']['getURL'] = [];
} }
if (!empty($_SESSION['user']['sessionCache']['getURL'][$relativePath])) { if (!empty($_SESSION['user']['sessionCache']['getURL'][$relativePath])) {
$_SESSION['user']['sessionCache']['getURL'][$relativePath] = fixTestURL($_SESSION['user']['sessionCache']['getURL'][$relativePath]);
return $_SESSION['user']['sessionCache']['getURL'][$relativePath]; return $_SESSION['user']['sessionCache']['getURL'][$relativePath];
} }
@ -9302,6 +9308,7 @@ function getURL($relativePath, $ignoreCDN = false)
} else { } else {
$url = $global['webSiteRootURL'] . $relativePath; $url = $global['webSiteRootURL'] . $relativePath;
} }
$url = fixTestURL($url);
if (file_exists($file)) { if (file_exists($file)) {
$cache = @filemtime($file) . '_' . @filectime($file); $cache = @filemtime($file) . '_' . @filectime($file);
$url = addQueryStringParameter($url, 'cache', $cache); $url = addQueryStringParameter($url, 'cache', $cache);
@ -9313,6 +9320,14 @@ function getURL($relativePath, $ignoreCDN = false)
return $url; return $url;
} }
function fixTestURL($text){
if(isAVideoMobileApp() || !empty($_REQUEST['isAVideoMobileApp'])){
$text = str_replace(array('https://vlu.me', 'vlu.me'), array('http://192.168.0.2', '192.168.0.2'), $text);
}
$text = str_replace(array('https://192.168.0.2'), array('http://192.168.0.2'), $text);
return $text;
}
function getCDNOrURL($url, $type = 'CDN', $id = 0) function getCDNOrURL($url, $type = 'CDN', $id = 0)
{ {
if (!preg_match('/^http/i', $url)) { if (!preg_match('/^http/i', $url)) {
@ -10080,18 +10095,23 @@ function getIncludeFileContent($filePath, $varsArray = [], $setCacheName = false
//_ob_start(); //_ob_start();
//$basename = basename($filePath); //$basename = basename($filePath);
//$return = "<!-- {$basename} start -->"; //$return = "<!-- {$basename} start -->";
$return = '';
if (!empty($setCacheName)) { if (!empty($setCacheName)) {
$name = $filePath . '_' . User::getId() .'_'.getLanguage(); $name = $filePath . '_' . User::getId() .'_'.getLanguage();
//var_dump($name);exit; //var_dump($name);exit;
$return = ObjectYPT::getSessionCache($name, 0); $return = ObjectYPT::getSessionCache($name, 0);
} }
if (empty($return)) { if (empty($return)) {
if(file_exists($filePath)){
include $filePath; include $filePath;
_ob_start(); _ob_start();
$return = _ob_get_clean(); $return = _ob_get_clean();
if (!empty($setCacheName)) { if (!empty($setCacheName)) {
ObjectYPT::setSessionCache($name, $return); ObjectYPT::setSessionCache($name, $return);
} }
}else{
_error_log("getIncludeFileContent error $filePath");
}
} }
//$return .= "<!-- {$basename} end -->"; //$return .= "<!-- {$basename} end -->";
echo $__out; echo $__out;

View file

@ -11,6 +11,10 @@ if (!empty($doNotIncludeConfig)) {
error_log('AVideo includeconfig ignored'); error_log('AVideo includeconfig ignored');
return false; return false;
} }
if(!isset($global['skippPlugins'])){
$global['skippPlugins'] = array();
}
/* /*
if($_SERVER["HTTP_HOST"] === 'localhost' || $_SERVER["HTTP_HOST"] === '127.0.0.1'){ if($_SERVER["HTTP_HOST"] === 'localhost' || $_SERVER["HTTP_HOST"] === '127.0.0.1'){
$global["webSiteRootURL"] = $_SERVER["REQUEST_SCHEME"].'://'.$_SERVER["HTTP_HOST"].$global["webSiteRootPath"]; $global["webSiteRootURL"] = $_SERVER["REQUEST_SCHEME"].'://'.$_SERVER["HTTP_HOST"].$global["webSiteRootPath"];
@ -88,6 +92,7 @@ if (empty($doNotConnectDatabaseIncludeConfig)) {
} else { } else {
$mysql_connect_was_closed = 1; $mysql_connect_was_closed = 1;
} }
$global['webSiteRootURL'] = fixTestURL($global['webSiteRootURL']);
require_once $global['systemRootPath'] . 'objects/mysql_dal.php'; require_once $global['systemRootPath'] . 'objects/mysql_dal.php';
require_once $global['systemRootPath'] . 'objects/configuration.php'; require_once $global['systemRootPath'] . 'objects/configuration.php';
require_once $global['systemRootPath'] . 'objects/security.php'; require_once $global['systemRootPath'] . 'objects/security.php';

View file

@ -1571,7 +1571,7 @@ if (typeof gtag !== \"function\") {
$user['photo'] = self::getPhoto($user['id']); $user['photo'] = self::getPhoto($user['id']);
$user['background'] = self::getBackground($user['id']); $user['background'] = self::getBackground($user['id']);
$user['tags'] = self::getTags($user['id']); $user['tags'] = self::getTags($user['id']);
$user['name'] = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/u', '', $user['name']); $user['name'] = @preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/u', '', $user['name']);
$user['isEmailVerified'] = $user['emailVerified']; $user['isEmailVerified'] = $user['emailVerified'];
if (!is_null($user['externalOptions'])) { if (!is_null($user['externalOptions'])) {
$externalOptions = User::decodeExternalOption($user['externalOptions']); $externalOptions = User::decodeExternalOption($user['externalOptions']);

View file

@ -2962,6 +2962,7 @@ if (!class_exists('Video')) {
TimeLogStart("video::getTags_ source $video_id, $type"); TimeLogStart("video::getTags_ source $video_id, $type");
if (empty($type) || $type === "source") { if (empty($type) || $type === "source") {
$url = $video->getVideoDownloadedLink(); $url = $video->getVideoDownloadedLink();
if(!empty($url)){
$parse = parse_url($url); $parse = parse_url($url);
$objTag = new stdClass(); $objTag = new stdClass();
$objTag->label = __("Source"); $objTag->label = __("Source");
@ -2977,6 +2978,7 @@ if (!class_exists('Video')) {
$objTag = new stdClass(); $objTag = new stdClass();
} }
} }
}
TimeLogEnd("video::getTags_ source $video_id, $type", __LINE__, $tolerance); TimeLogEnd("video::getTags_ source $video_id, $type", __LINE__, $tolerance);
if (!empty($video->getRrating())) { if (!empty($video->getRrating())) {

View file

@ -28,6 +28,10 @@ class API extends PluginAbstract {
if (!isset($obj->current)) { if (!isset($obj->current)) {
$obj->current = getCurrentPage(); $obj->current = getCurrentPage();
} }
if (!isset($obj->rowCount)) {
$obj->rowCount = getRowCount();
}
$obj->hasMore = true; $obj->hasMore = true;
if(!empty($obj->rows) && is_array($obj->rows)){ if(!empty($obj->rows) && is_array($obj->rows)){
if (count($obj->rows) < $obj->rowCount) { if (count($obj->rows) < $obj->rowCount) {
@ -934,7 +938,7 @@ class API extends PluginAbstract {
unset($obj->user['externalOptions']); unset($obj->user['externalOptions']);
unset($obj->user['extra_info']); unset($obj->user['extra_info']);
$obj->user['canStream'] = $obj->user['canStream'] || $obj->user['isAdmin']; $obj->user['canStream'] = $obj->user['canStream'] || $obj->user['isAdmin'];
$obj->user['DonationButtons'] = _json_decode($obj->user['DonationButtons']); $obj->user['DonationButtons'] = _json_decode(@$obj->user['DonationButtons']);
$obj->livestream = LiveTransmition::createTransmitionIfNeed($user->getBdId()); $obj->livestream = LiveTransmition::createTransmitionIfNeed($user->getBdId());
$obj->livestream["users_id"] = $user->getBdId(); $obj->livestream["users_id"] = $user->getBdId();

View file

@ -31,8 +31,12 @@ class AVideoPlugin
public static function addRoutes() public static function addRoutes()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -45,8 +49,12 @@ class AVideoPlugin
public static function addView($videos_id, $total) public static function addView($videos_id, $total)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -58,12 +66,16 @@ class AVideoPlugin
} }
public static function getHeadCode(){ public static function getHeadCode(){
global $global;
if(self::isDebuging(__FUNCTION__)){ if(self::isDebuging(__FUNCTION__)){
return '<!-- AVideoPlugin::'.__FUNCTION__.' disabled -->'; return '<!-- AVideoPlugin::'.__FUNCTION__.' disabled -->';
} }
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = ""; $str = "";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -78,9 +90,13 @@ class AVideoPlugin
} }
public static function getChartTabs(){ public static function getChartTabs(){
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = ""; $str = "";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -100,9 +116,13 @@ class AVideoPlugin
public static function getChartContent() public static function getChartContent()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = ""; $str = "";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -118,9 +138,13 @@ class AVideoPlugin
public static function getGallerySection() public static function getGallerySection()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = ""; $str = "";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -133,9 +157,13 @@ class AVideoPlugin
public static function getHelpToc() public static function getHelpToc()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = "<h4>" . __("Table of content") . "</h4><ul>"; $str = "<h4>" . __("Table of content") . "</h4><ul>";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -151,9 +179,13 @@ class AVideoPlugin
public static function getHelp() public static function getHelp()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = ""; $str = "";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -169,12 +201,16 @@ class AVideoPlugin
} }
public static function getFooterCode(){ public static function getFooterCode(){
global $global;
if(self::isDebuging(__FUNCTION__)){ if(self::isDebuging(__FUNCTION__)){
return '<!-- AVideoPlugin::'.__FUNCTION__.' disabled -->'; return '<!-- AVideoPlugin::'.__FUNCTION__.' disabled -->';
} }
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$str = ""; $str = "";
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -189,9 +225,13 @@ class AVideoPlugin
public static function getJSFiles() public static function getJSFiles()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$allFiles = []; $allFiles = [];
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -324,10 +364,15 @@ class AVideoPlugin
} }
public static function loadPluginIfEnabled($name){ public static function loadPluginIfEnabled($name){
global $_loadPluginIfEnabled; global $_loadPluginIfEnabled, $global;
if(!isset($_loadPluginIfEnabled)){ if(!isset($_loadPluginIfEnabled)){
$_loadPluginIfEnabled = array(); $_loadPluginIfEnabled = array();
} }
if(in_array($name, $global['skippPlugins'])){
return false;
}
if(isset($_loadPluginIfEnabled[$name])){ if(isset($_loadPluginIfEnabled[$name])){
return $_loadPluginIfEnabled[$name]; return $_loadPluginIfEnabled[$name];
} }
@ -1897,9 +1942,13 @@ class AVideoPlugin
public static function dataSetup() public static function dataSetup()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$r = []; $r = [];
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -1917,8 +1966,12 @@ class AVideoPlugin
public static function onVideoSetLive_transmitions_history_id($video_id, $oldValue, $newValue) public static function onVideoSetLive_transmitions_history_id($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -1931,8 +1984,12 @@ class AVideoPlugin
public static function onVideoSetEncoderURL($video_id, $oldValue, $newValue) public static function onVideoSetEncoderURL($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -1945,8 +2002,12 @@ class AVideoPlugin
public static function onVideoSetFilepath($video_id, $oldValue, $newValue) public static function onVideoSetFilepath($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -1959,8 +2020,12 @@ class AVideoPlugin
public static function onVideoSetFilesize($video_id, $oldValue, $newValue) public static function onVideoSetFilesize($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -1973,8 +2038,12 @@ class AVideoPlugin
public static function onVideoSetUsers_id($video_id, $oldValue, $newValue) public static function onVideoSetUsers_id($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -1987,8 +2056,12 @@ class AVideoPlugin
public static function onVideoSetSites_id($video_id, $oldValue, $newValue) public static function onVideoSetSites_id($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2001,8 +2074,12 @@ class AVideoPlugin
public static function onVideoSetVideo_password($video_id, $oldValue, $newValue) public static function onVideoSetVideo_password($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2015,8 +2092,12 @@ class AVideoPlugin
public static function onVideoSetClean_title($video_id, $oldValue, $newValue) public static function onVideoSetClean_title($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2029,8 +2110,12 @@ class AVideoPlugin
public static function onVideoSetDuration($video_id, $oldValue, $newValue) public static function onVideoSetDuration($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2043,8 +2128,12 @@ class AVideoPlugin
public static function onVideoSetIsSuggested($video_id, $oldValue, $newValue) public static function onVideoSetIsSuggested($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2057,8 +2146,12 @@ class AVideoPlugin
public static function onVideoSetStatus($video_id, $oldValue, $newValue) public static function onVideoSetStatus($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2071,8 +2164,12 @@ class AVideoPlugin
public static function onVideoSetType($video_id, $oldValue, $newValue, $force) public static function onVideoSetType($video_id, $oldValue, $newValue, $force)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2085,8 +2182,12 @@ class AVideoPlugin
public static function onVideoSetRotation($video_id, $oldValue, $newValue) public static function onVideoSetRotation($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2099,8 +2200,12 @@ class AVideoPlugin
public static function onVideoSetZoom($video_id, $oldValue, $newValue) public static function onVideoSetZoom($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2113,8 +2218,12 @@ class AVideoPlugin
public static function onVideoSetDescription($video_id, $oldValue, $newValue) public static function onVideoSetDescription($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2127,8 +2236,12 @@ class AVideoPlugin
public static function onVideoSetCategories_id($video_id, $oldValue, $newValue) public static function onVideoSetCategories_id($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2141,8 +2254,12 @@ class AVideoPlugin
public static function onVideoSetVideoDownloadedLink($video_id, $oldValue, $newValue) public static function onVideoSetVideoDownloadedLink($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2155,8 +2272,12 @@ class AVideoPlugin
public static function onVideoSetVideoGroups($video_id, $oldValue, $newValue) public static function onVideoSetVideoGroups($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2169,8 +2290,12 @@ class AVideoPlugin
public static function onVideoSetTrailer1($video_id, $oldValue, $newValue) public static function onVideoSetTrailer1($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2183,8 +2308,12 @@ class AVideoPlugin
public static function onVideoSetTrailer2($video_id, $oldValue, $newValue) public static function onVideoSetTrailer2($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2197,8 +2326,12 @@ class AVideoPlugin
public static function onVideoSetTrailer3($video_id, $oldValue, $newValue) public static function onVideoSetTrailer3($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2211,8 +2344,12 @@ class AVideoPlugin
public static function onVideoSetRate($video_id, $oldValue, $newValue) public static function onVideoSetRate($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2225,8 +2362,12 @@ class AVideoPlugin
public static function onVideoSetYoutubeId($video_id, $oldValue, $newValue) public static function onVideoSetYoutubeId($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2239,8 +2380,12 @@ class AVideoPlugin
public static function onVideoSetTitle($video_id, $oldValue, $newValue) public static function onVideoSetTitle($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2256,8 +2401,12 @@ class AVideoPlugin
public static function onVideoSetFilename($video_id, $oldValue, $newValue, $force) public static function onVideoSetFilename($video_id, $oldValue, $newValue, $force)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2270,8 +2419,12 @@ class AVideoPlugin
public static function onVideoSetNext_videos_id($video_id, $oldValue, $newValue) public static function onVideoSetNext_videos_id($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2284,8 +2437,12 @@ class AVideoPlugin
public static function onVideoSetVideoLink($video_id, $oldValue, $newValue) public static function onVideoSetVideoLink($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2298,8 +2455,12 @@ class AVideoPlugin
public static function onVideoSetCan_download($video_id, $oldValue, $newValue) public static function onVideoSetCan_download($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2312,8 +2473,12 @@ class AVideoPlugin
public static function onVideoSetCan_share($video_id, $oldValue, $newValue) public static function onVideoSetCan_share($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2326,8 +2491,12 @@ class AVideoPlugin
public static function getWalletConfigurationHTML($users_id, $wallet, $walletDataObject) public static function getWalletConfigurationHTML($users_id, $wallet, $walletDataObject)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2340,8 +2509,12 @@ class AVideoPlugin
public static function onVideoSetOnly_for_paid($video_id, $oldValue, $newValue) public static function onVideoSetOnly_for_paid($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2354,8 +2527,12 @@ class AVideoPlugin
public static function onVideoSetRrating($video_id, $oldValue, $newValue) public static function onVideoSetRrating($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2378,8 +2555,12 @@ class AVideoPlugin
* @return $file * @return $file
*/ */
public static function modifyURL($file){ public static function modifyURL($file){
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2392,8 +2573,12 @@ class AVideoPlugin
public static function onVideoSetExternalOptions($video_id, $oldValue, $newValue) public static function onVideoSetExternalOptions($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2406,8 +2591,12 @@ class AVideoPlugin
public static function onVideoSetVideoStartSeconds($video_id, $oldValue, $newValue) public static function onVideoSetVideoStartSeconds($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2420,8 +2609,12 @@ class AVideoPlugin
public static function onVideoSetSerie_playlists_id($video_id, $oldValue, $newValue) public static function onVideoSetSerie_playlists_id($video_id, $oldValue, $newValue)
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
@ -2434,8 +2627,12 @@ class AVideoPlugin
public static function getMobileHomePageURL() public static function getMobileHomePageURL()
{ {
global $global;
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) { foreach ($plugins as $value) {
if(in_array($value['dirName'], $global['skippPlugins'])){
continue;
}
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {

View file

@ -35,6 +35,7 @@ $objMM->logo = getURL($config->getLogo());
$objMM->favicon = $config->getFavicon(true); $objMM->favicon = $config->getFavicon(true);
$objMM->title = $config->getWebSiteTitle(); $objMM->title = $config->getWebSiteTitle();
$objMM->version = $config->getVersion(); $objMM->version = $config->getVersion();
$objMM->encoder = $config->getEncoderURL(true);
$objMM->EULA_original = $objMM->EULA->value; $objMM->EULA_original = $objMM->EULA->value;
$objMM->EULA = nl2br($objMM->EULA->value); $objMM->EULA = nl2br($objMM->EULA->value);
$objMM->YPTSocket = AVideoPlugin::getDataObjectIfEnabled('YPTSocket'); $objMM->YPTSocket = AVideoPlugin::getDataObjectIfEnabled('YPTSocket');

View file

@ -10,14 +10,16 @@ if (!isset($global['systemRootPath'])) {
$configFile = '../../videos/configuration.php'; $configFile = '../../videos/configuration.php';
require_once $configFile; require_once $configFile;
} }
$global['skippPlugins'][] = 'VideoResolutionSwitcher';
$global['skippPlugins'][] = 'PlayerSkins';
$global['skippPlugins'][] = 'TheaterButton';
//$global['doNotLoadPlayer'] = 1;
$bodyClass = ''; $bodyClass = '';
$key = ''; $key = '';
$live_servers_id = ''; $live_servers_id = '';
$live_index = ''; $live_index = '';
$users_id = User::getId(); $users_id = User::getId();
if (!empty($_REQUEST['logoff'])) { if (!empty($_REQUEST['logoff'])) {
User::logoff(); User::logoff();
} }
@ -34,7 +36,7 @@ if (User::isLogged()) {
$lth = LiveTransmitionHistory::getLatestFromUser($users_id); $lth = LiveTransmitionHistory::getLatestFromUser($users_id);
$key = $lth['key']; $key = $lth['key'];
$live_servers_id = $lth['live_servers_id']; $live_servers_id = $lth['live_servers_id'];
$live_index = $lth['live_index']; $live_index = @$lth['live_index'];
} }
if (!empty($key)) { if (!empty($key)) {
@ -48,6 +50,7 @@ if (User::isLogged()) {
//var_dump($livet, $getLiveKey, isLive());exit; //var_dump($livet, $getLiveKey, isLive());exit;
if (AVideoPlugin::isEnabledByName('Chat2')) { if (AVideoPlugin::isEnabledByName('Chat2')) {
$latest = LiveTransmitionHistory::getLatestFromUser($users_id);
$chat = new ChatIframeOptions(); $chat = new ChatIframeOptions();
$chat->set_room_users_id($users_id); $chat->set_room_users_id($users_id);
$chat->set_live_transmitions_history_id($latest['id']); $chat->set_live_transmitions_history_id($latest['id']);
@ -104,13 +107,19 @@ if (User::isLogged()) {
} }
} }
} else { } else {
header("Location: {$global['webSiteRootURL']}plugin/MobileYPT/loginPage.php"); //header("Location: {$global['webSiteRootURL']}plugin/MobileYPT/loginPage.php");
header("Location: loginPage.php"); // make sure you keep the same URL
exit; exit;
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="">
<head> <head>
<style>
body {
padding: 100px 0;
}
</style>
<?php <?php
include $global['systemRootPath'] . 'view/include/head.php'; include $global['systemRootPath'] . 'view/include/head.php';
?> ?>
@ -149,7 +158,7 @@ if (User::isLogged()) {
</style> </style>
</head> </head>
<body style="background-color: transparent; <?php echo $bodyClass; ?>"> <body style="background-color: transparent; <?php echo @$bodyClass; ?>">
<?php <?php
echo $html; echo $html;
?> ?>

View file

@ -19,7 +19,7 @@ if (!empty($_REQUEST['user']) && !empty($_REQUEST['pass'])) {
User::loginFromRequest(); User::loginFromRequest();
} }
if (User::isLogged()) { if (User::isLogged()) {
$html .= getIncludeFileContent($global['systemRootPath'] . 'plugin/MobileYPT/userButtons.php'); //$html .= getIncludeFileContent($global['systemRootPath'] . 'plugin/MobileYPT/userButtons.php');
} else { } else {
if (!empty($_REQUEST['SignUp'])) { if (!empty($_REQUEST['SignUp'])) {
$html .= getIncludeFileContent($global['systemRootPath'] . 'view/userSignUpBody.php'); $html .= getIncludeFileContent($global['systemRootPath'] . 'view/userSignUpBody.php');
@ -31,6 +31,7 @@ if (User::isLogged()) {
$html .= getIncludeFileContent($global['systemRootPath'] . 'view/userLogin.php', array('signUpURL' => $signUpURL, '_GET[\'redirectUri\']' => $redirectUri, 'hideRememberMe' => 1)); $html .= getIncludeFileContent($global['systemRootPath'] . 'view/userLogin.php', array('signUpURL' => $signUpURL, '_GET[\'redirectUri\']' => $redirectUri, 'hideRememberMe' => 1));
} }
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="">
@ -73,7 +74,7 @@ if (User::isLogged()) {
</style> </style>
</head> </head>
<body style="background-color: transparent; <?php echo $bodyClass; ?>"> <body style="background-color: transparent; <?php echo @$bodyClass; ?>">
<?php <?php
echo $html; echo $html;
?> ?>

View file

@ -61,6 +61,7 @@ class TheaterButton extends PluginAbstract {
$obj = $this->getDataObject(); $obj = $this->getDataObject();
if (!empty($obj->show_switch_button)) { if (!empty($obj->show_switch_button)) {
//var_dump(debug_backtrace());exit;
return array("plugin/TheaterButton/script.js", "plugin/TheaterButton/addButton.js"); return array("plugin/TheaterButton/script.js", "plugin/TheaterButton/addButton.js");
} }
return array("plugin/TheaterButton/script.js"); return array("plugin/TheaterButton/script.js");
@ -83,6 +84,9 @@ class TheaterButton extends PluginAbstract {
} }
private function showButton() { private function showButton() {
if(!isAVideoPlayer()){
return false;
}
if (isMobile() || isEmbed()) { if (isMobile() || isEmbed()) {
return false; return false;
} }

View file

@ -10,7 +10,7 @@ if (empty($advancedCustom)) {
$advancedCustom = AVideoPlugin::getObjectData("CustomizeAdvanced"); $advancedCustom = AVideoPlugin::getObjectData("CustomizeAdvanced");
} }
TimeLogEnd($timeLogHead, __LINE__); TimeLogEnd($timeLogHead, __LINE__);
if (is_object($video)) { if (!empty($video) && is_object($video)) {
$video = Video::getVideoLight($video->getId()); $video = Video::getVideoLight($video->getId());
} }
TimeLogEnd($timeLogHead, __LINE__); TimeLogEnd($timeLogHead, __LINE__);
@ -227,14 +227,14 @@ if (isRTL()) {
</script> </script>
<?php <?php
if (!isOffline() && !$config->getDisable_analytics()) { if (!isOffline() && !$config->getDisable_analytics()) {
include_once $global['systemRootPath'] . 'view/include/ga.php'; //include_once $global['systemRootPath'] . 'view/include/ga.php';
} }
TimeLogEnd($timeLogHead, __LINE__); TimeLogEnd($timeLogHead, __LINE__);
if (!isBot()) { if (!isBot()) {
echo $config->getHead(); echo fixTestURL($config->getHead());
} }
TimeLogEnd($timeLogHead, __LINE__); TimeLogEnd($timeLogHead, __LINE__);
echo $head; echo fixTestURL($head);
if (!empty($video)) { if (!empty($video)) {
if (!empty($video['users_id'])) { if (!empty($video['users_id'])) {
$userAnalytics = new User($video['users_id']); $userAnalytics = new User($video['users_id']);