mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Modernise array syntax.
This commit is contained in:
parent
af0b9a239a
commit
3259b922b3
49 changed files with 312 additions and 312 deletions
|
@ -110,7 +110,7 @@ if(_isSchedulerPresentOnCrontab()){
|
|||
}else{
|
||||
$messages['Server'][] = ["Scheduler plugin is NOT installed on your crontab, open your terminal and type 'crontab -e', than add the code: ", "* * * * * php {$global['systemRootPath']}plugin/Scheduler/run.php"];
|
||||
}
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
foreach ($linuxApps as $value) {
|
||||
|
@ -186,7 +186,7 @@ if (empty($verified)) {
|
|||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-8 col-md-6">
|
||||
<div class="panel panel-default">
|
||||
|
@ -194,7 +194,7 @@ if (empty($verified)) {
|
|||
Server
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach ($messages['Server'] as $value) {
|
||||
|
@ -208,16 +208,16 @@ foreach ($messages['Server'] as $value) {
|
|||
if (!empty($value[1])) {
|
||||
if (preg_match('/^http/i', $value[1])) {
|
||||
?>
|
||||
<a href="<?php echo $value[1]; ?>" class="btn btn-danger btn-xs btn-block" target="_blank"><i class="fas fa-hand-holding-medical"></i> </a>
|
||||
<a href="<?php echo $value[1]; ?>" class="btn btn-danger btn-xs btn-block" target="_blank"><i class="fas fa-hand-holding-medical"></i> </a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<br><code><?php echo $value[1]; ?></code>
|
||||
<br><code><?php echo $value[1]; ?></code>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
|
@ -225,8 +225,8 @@ foreach ($messages['Server'] as $value) {
|
|||
<div class="col-lg-4 col-md-6 <?php echo getCSSAnimationClassAndStyle('animate__flipInX'); ?>">
|
||||
<div class="alert alert-success">
|
||||
<i class="fas fa-check"></i> <?php echo $value; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ($count % 2 === 0) {
|
||||
|
@ -248,7 +248,7 @@ foreach ($messages['Server'] as $value) {
|
|||
PHP
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<?php
|
||||
foreach ($messages['PHP'] as $value) {
|
||||
if (is_array($value)) {
|
||||
|
@ -260,16 +260,16 @@ foreach ($messages['PHP'] as $value) {
|
|||
if (!empty($value[1])) {
|
||||
if (preg_match('/^http/i', $value[1])) {
|
||||
?>
|
||||
<a href="<?php echo $value[1]; ?>" class="btn btn-danger btn-xs btn-block" target="_blank"><i class="fas fa-hand-holding-medical"></i> </a>
|
||||
<a href="<?php echo $value[1]; ?>" class="btn btn-danger btn-xs btn-block" target="_blank"><i class="fas fa-hand-holding-medical"></i> </a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<br><code><?php echo $value[1]; ?></code>
|
||||
<br><code><?php echo $value[1]; ?></code>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
|
@ -277,8 +277,8 @@ foreach ($messages['PHP'] as $value) {
|
|||
<div class="col-sm-12 <?php echo getCSSAnimationClassAndStyle('animate__flipInX'); ?>">
|
||||
<div class="alert alert-success">
|
||||
<i class="fas fa-check"></i> <?php echo $value; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ foreach ($messages['PHP'] as $value) {
|
|||
Apache
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<?php
|
||||
foreach ($messages['Apache'] as $value) {
|
||||
if (is_array($value)) {
|
||||
|
@ -306,16 +306,16 @@ foreach ($messages['Apache'] as $value) {
|
|||
if (!empty($value[1])) {
|
||||
if (preg_match('/^http/i', $value[1])) {
|
||||
?>
|
||||
<a href="<?php echo $value[1]; ?>" class="btn btn-danger btn-xs btn-block" target="_blank"><i class="fas fa-hand-holding-medical"></i> </a>
|
||||
<a href="<?php echo $value[1]; ?>" class="btn btn-danger btn-xs btn-block" target="_blank"><i class="fas fa-hand-holding-medical"></i> </a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<br><code><?php echo $value[1]; ?></code>
|
||||
<br><code><?php echo $value[1]; ?></code>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
|
@ -323,8 +323,8 @@ foreach ($messages['Apache'] as $value) {
|
|||
<div class="col-sm-12 <?php echo getCSSAnimationClassAndStyle('animate__flipInX'); ?>">
|
||||
<div class="alert alert-success">
|
||||
<i class="fas fa-check"></i> <?php echo $value; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ if (empty($config)) {
|
|||
|
||||
// filter some security here
|
||||
if (!empty($_GET['lang'])) {
|
||||
$_GET['lang'] = str_replace(array("'", '"', """, "'"), array('', '', '', ''), xss_esc($_GET['lang']));
|
||||
$_GET['lang'] = str_replace(["'", '"', """, "'"], ['', '', '', ''], xss_esc($_GET['lang']));
|
||||
}
|
||||
|
||||
if (!empty($_GET['lang'])) {
|
||||
|
@ -21,7 +21,7 @@ function __($str, $allowHTML = false) {
|
|||
if (is_array($t) && function_exists('array_change_key_case') && !isCommandLineInterface()) {
|
||||
$t_insensitive = array_change_key_case($t, CASE_LOWER);
|
||||
} else {
|
||||
$t_insensitive = array();
|
||||
$t_insensitive = [];
|
||||
}
|
||||
}
|
||||
$return = $str;
|
||||
|
@ -35,7 +35,7 @@ function __($str, $allowHTML = false) {
|
|||
if ($allowHTML) {
|
||||
return $return;
|
||||
}
|
||||
return str_replace(array("'", '"', "<", '>'), array(''', '"', '<', '>'), $return);
|
||||
return str_replace(["'", '"', "<", '>'], [''', '"', '<', '>'], $return);
|
||||
}
|
||||
|
||||
function printJSString($str, $return = false) {
|
||||
|
@ -55,7 +55,7 @@ function isRTL() {
|
|||
function getAllFlags() {
|
||||
global $global;
|
||||
$dir = "{$global['systemRootPath']}view/css/flag-icon-css-master/flags/4x3";
|
||||
$flags = array();
|
||||
$flags = [];
|
||||
if ($handle = opendir($dir)) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != "..") {
|
||||
|
@ -76,7 +76,7 @@ function getAllFlags() {
|
|||
function getEnabledLangs() {
|
||||
global $global;
|
||||
$dir = "{$global['systemRootPath']}locale";
|
||||
$flags = array();
|
||||
$flags = [];
|
||||
if (empty($global['dont_show_us_flag'])) {
|
||||
$flags[] = 'us';
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ function textToLink($string, $targetBlank = false) {
|
|||
}
|
||||
|
||||
function br2nl($html) {
|
||||
$nl = preg_replace(array('#<br\s*/?>#i', '#<p\s*/?>#i', '#</p\s*>#i'), array("\n", "\n", ''), $html);
|
||||
$nl = preg_replace(['#<br\s*/?>#i', '#<p\s*/?>#i', '#</p\s*>#i'], ["\n", "\n", ''], $html);
|
||||
return $nl;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ if (isset($_GET['getLanguage'])) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$vars = array();
|
||||
$vars = [];
|
||||
require_once '../videos/configuration.php';
|
||||
require_once '../objects/functions.php';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ abstract class ObjectYPT implements ObjectInterface
|
|||
|
||||
public static function getSearchFieldsNames()
|
||||
{
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
public function load($id)
|
||||
|
@ -291,7 +291,7 @@ abstract class ObjectYPT implements ObjectInterface
|
|||
return false;
|
||||
}
|
||||
$formats = '';
|
||||
$values = array();
|
||||
$values = [];
|
||||
if (!empty($this->id)) {
|
||||
$sql = "UPDATE " . static::getTableName() . " SET ";
|
||||
$fields = [];
|
||||
|
@ -426,7 +426,7 @@ abstract class ObjectYPT implements ObjectInterface
|
|||
static function ignoreTableSecurityCheck()
|
||||
{
|
||||
|
||||
$ignoreArray = array(
|
||||
$ignoreArray = [
|
||||
'vast_campaigns_logs',
|
||||
'videos', 'CachesInDB',
|
||||
'plugins',
|
||||
|
@ -438,7 +438,7 @@ abstract class ObjectYPT implements ObjectInterface
|
|||
'wallet_log',
|
||||
'live_restreams_logs',
|
||||
'clone_SitesAllowed'
|
||||
);
|
||||
];
|
||||
return in_array(static::getTableName(), $ignoreArray);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,13 +56,13 @@ if (empty($_POST['sort']) && empty($_GET['sort'])) {
|
|||
array_multisort($array_column, SORT_ASC, $categories);
|
||||
}
|
||||
|
||||
$json = array(
|
||||
$json = [
|
||||
'current'=>getCurrentPage(),
|
||||
'rowCount'=>getRowCount(),
|
||||
'total'=>$total,
|
||||
'rows'=>$categories,
|
||||
'onlyWithVideos'=>$onlyWithVideos,
|
||||
'sameUserGroupAsMe'=>$sameUserGroupAsMe
|
||||
);
|
||||
];
|
||||
|
||||
echo _json_encode($json);
|
||||
|
|
|
@ -402,7 +402,7 @@ class Category {
|
|||
_error_log('getAllCategories getUserGroups');
|
||||
$users_groups = UserGroups::getUserGroups($sameUserGroupAsMe);
|
||||
|
||||
$users_groups_id = array(0);
|
||||
$users_groups_id = [0];
|
||||
foreach ($users_groups as $value) {
|
||||
$users_groups_id[] = $value['id'];
|
||||
}
|
||||
|
@ -978,10 +978,10 @@ class Category {
|
|||
|
||||
public static function setUsergroups($categories_id, $usergroups_ids_array) {
|
||||
if (!is_array($usergroups_ids_array)) {
|
||||
$usergroups_ids_array = array($usergroups_ids_array);
|
||||
$usergroups_ids_array = [$usergroups_ids_array];
|
||||
}
|
||||
Categories_has_users_groups::deleteAllFromCategory($categories_id);
|
||||
$return = array();
|
||||
$return = [];
|
||||
foreach ($usergroups_ids_array as $users_groups_id) {
|
||||
$id = Categories_has_users_groups::saveUsergroup($categories_id, $users_groups_id);
|
||||
$return[] = $id;
|
||||
|
|
|
@ -14,7 +14,7 @@ setRowCount(10);
|
|||
//setDefaultSort('id', 'DESC');
|
||||
if(empty($_REQUEST['id'])){
|
||||
if(empty($_POST['sort'])){
|
||||
$_POST['sort'] = array();
|
||||
$_POST['sort'] = [];
|
||||
$_POST['sort']['pin'] = 'DESC';
|
||||
//$_POST['sort']['comments_id_pai'] = 'IS NULL DESC';
|
||||
//$_POST['sort']['comments_id_pai'] = 'DESC';
|
||||
|
@ -25,10 +25,10 @@ if(empty($_REQUEST['id'])){
|
|||
}else{
|
||||
$comment = Comment::getComment($_REQUEST['id']);
|
||||
if(!empty($comment)){
|
||||
$comments = array($comment);
|
||||
$comments = [$comment];
|
||||
$total = 1;
|
||||
}else{
|
||||
$comments = array();
|
||||
$comments = [];
|
||||
$total = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ if ($startActive) {
|
|||
if ($invert) {
|
||||
|
||||
if(preg_match('/style=["\']/', $parameters)){
|
||||
$parameters = str_replace(array('style="','style=\''), array('style="transform: scale(-1,1);', 'style=\'transform: scale(-1,1);'), $parameters );
|
||||
$parameters = str_replace(['style="','style=\''], ['style="transform: scale(-1,1);', 'style=\'transform: scale(-1,1);'], $parameters );
|
||||
}else{
|
||||
$parameters .= 'style="transform: scale(-1,1);"';
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ $AVideoStorage_UA = "AVideoStorage";
|
|||
$mysql_connect_was_closed = 1;
|
||||
|
||||
if (!isset($global) || !is_array($global)) {
|
||||
$global = array();
|
||||
$global = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -427,7 +427,7 @@ function safeString($text, $strict = false, $try=0){
|
|||
}
|
||||
$originalText = $text;
|
||||
$text = strip_tags($text);
|
||||
$text = str_replace(array('&', '<', '>'), array('', '', ''), $text);
|
||||
$text = str_replace(['&', '<', '>'], ['', '', ''], $text);
|
||||
$text = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '', $text);
|
||||
$text = preg_replace('/(&#x*[0-9A-F]+);*/iu', '', $text);
|
||||
$text = html_entity_decode($text, ENT_COMPAT, 'UTF-8');
|
||||
|
@ -1559,7 +1559,7 @@ function getVideosURL_V2($fileName, $recreateCache = false)
|
|||
$pdf = $paths['path'] . "{$cleanfilename}.pdf";
|
||||
$mp3 = $paths['path'] . "{$cleanfilename}.mp3";
|
||||
|
||||
$extraFiles = array();
|
||||
$extraFiles = [];
|
||||
if (file_exists($pdf)) {
|
||||
$extraFilesPDF = getVideosURLPDF($fileName);
|
||||
if($isAVideo){
|
||||
|
@ -1688,7 +1688,7 @@ function getSources($fileName, $returnArray = false, $try = 0)
|
|||
} else {
|
||||
_error_log("getSources($fileName) File not found " . json_encode($video));
|
||||
if (empty($sources)) {
|
||||
$sources = array();
|
||||
$sources = [];
|
||||
}
|
||||
$obj = new stdClass();
|
||||
$obj->type = "video/mp4";
|
||||
|
@ -1785,7 +1785,7 @@ function getImageFormat($file)
|
|||
}
|
||||
}
|
||||
|
||||
return array('format' => $format, 'extension' => $extension);
|
||||
return ['format' => $format, 'extension' => $extension];
|
||||
}
|
||||
|
||||
function im_resize($file_src, $file_dest, $wd, $hd, $q = 80)
|
||||
|
@ -1955,7 +1955,7 @@ function scaleUpAndMantainAspectRatioFinalSizes($new_w, $old_w, $new_h, $old_h)
|
|||
$thumb_w = $old_w * $aspectRatio2;
|
||||
$thumb_h = $old_h * $aspectRatio2;
|
||||
}
|
||||
return array('w' => $thumb_w, 'h' => $thumb_h);
|
||||
return ['w' => $thumb_w, 'h' => $thumb_h];
|
||||
}
|
||||
|
||||
function scaleUpImage($file_src, $file_dest, $wd, $hd)
|
||||
|
@ -3745,7 +3745,7 @@ function siteMap()
|
|||
$_POST['sort']['created'] = "DESC";
|
||||
$rows = Video::getAllVideosLight(!empty($advancedCustom->showPrivateVideosOnSitemap) ? "viewableNotUnlisted" : "publicOnly");
|
||||
if (empty($rows) || !is_array($rows)) {
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
_error_log("siteMap: getAllVideos " . count($rows));
|
||||
foreach ($rows as $video) {
|
||||
|
@ -4119,7 +4119,7 @@ function convertImageIfNotExists($source, $destination, $width, $height, $scaleU
|
|||
_error_log("convertImageIfNotExists: source image is empty");
|
||||
return false;
|
||||
}
|
||||
$source = str_replace(array('_thumbsSmallV2'), array(''), $source);
|
||||
$source = str_replace(['_thumbsSmallV2'], [''], $source);
|
||||
if (!file_exists($source)) {
|
||||
_error_log("convertImageIfNotExists: source does not exists {$source}");
|
||||
return false;
|
||||
|
@ -4640,11 +4640,11 @@ function blackListRegenerateSession()
|
|||
if (!requestComesFromSafePlace()) {
|
||||
return false;
|
||||
}
|
||||
$list = array(
|
||||
$list = [
|
||||
'objects/getCaptcha.php',
|
||||
'objects/userCreate.json.php',
|
||||
'objects/videoAddViewCount.json.php',
|
||||
);
|
||||
];
|
||||
foreach ($list as $needle) {
|
||||
if (str_ends_with($_SERVER['SCRIPT_NAME'], $needle)) {
|
||||
return true;
|
||||
|
@ -4657,7 +4657,7 @@ function _mysql_connect($persistent = false, $try = 0)
|
|||
{
|
||||
global $global, $mysqlHost, $mysqlUser, $mysqlPass, $mysqlDatabase, $mysqlPort, $mysql_connect_was_closed;
|
||||
|
||||
$checkValues = array('mysqlHost', 'mysqlUser', 'mysqlPass', 'mysqlDatabase');
|
||||
$checkValues = ['mysqlHost', 'mysqlUser', 'mysqlPass', 'mysqlDatabase'];
|
||||
|
||||
foreach ($checkValues as $value) {
|
||||
if (!isset($$value)) {
|
||||
|
@ -5623,14 +5623,14 @@ function getPlayListData()
|
|||
{
|
||||
global $playListData;
|
||||
if (empty($playListData)) {
|
||||
$playListData = array();
|
||||
$playListData = [];
|
||||
}
|
||||
return $playListData;
|
||||
}
|
||||
|
||||
function getPlayListDataVideosId()
|
||||
{
|
||||
$playListData_videos_id = array();
|
||||
$playListData_videos_id = [];
|
||||
foreach (getPlayListData() as $value) {
|
||||
$playListData_videos_id[] = $value->getVideos_id();
|
||||
}
|
||||
|
@ -5794,7 +5794,7 @@ function isValidEmail($email) {
|
|||
return false;
|
||||
}
|
||||
if(!isset($_email_hosts_checked)){
|
||||
$_email_hosts_checked = array();
|
||||
$_email_hosts_checked = [];
|
||||
}
|
||||
|
||||
//Get host name from email and check if it is valid
|
||||
|
@ -5846,7 +5846,7 @@ function isValidURLOrPath($str, $insideCacheOrTmpDirOnly = true) {
|
|||
return false;
|
||||
}
|
||||
|
||||
$pathsToCheck = array($absolutePath, $str);
|
||||
$pathsToCheck = [$absolutePath, $str];
|
||||
|
||||
foreach ($pathsToCheck as $value) {
|
||||
if (
|
||||
|
@ -6578,7 +6578,7 @@ function _json_encode($object)
|
|||
}
|
||||
|
||||
$json = json_encode($object);
|
||||
$errors = array();
|
||||
$errors = [];
|
||||
if (empty($json) && json_last_error()) {
|
||||
if (preg_match('/Malformed UTF-8 characters/i', json_last_error_msg())) {
|
||||
$json = _json_encode_utf8($object);
|
||||
|
@ -6816,15 +6816,15 @@ function getCaptcha($uid = "", $forceCaptcha = false)
|
|||
if (empty($uid)) {
|
||||
$uid = "capcha_" . uniqid();
|
||||
}
|
||||
$contents = getIncludeFileContent($global['systemRootPath'] . 'objects/functiongetCaptcha.php', array('uid' => $uid, 'forceCaptcha' => $forceCaptcha));
|
||||
$contents = getIncludeFileContent($global['systemRootPath'] . 'objects/functiongetCaptcha.php', ['uid' => $uid, 'forceCaptcha' => $forceCaptcha]);
|
||||
$parts = explode('<script>', $contents);
|
||||
return array(
|
||||
return [
|
||||
'content' => $contents,
|
||||
'btnReloadCapcha' => "$('#btnReload{$uid}').trigger('click');",
|
||||
'captchaText' => "$('#{$uid}Text').val()",
|
||||
'html' => $parts[0],
|
||||
'script' => str_replace('</script>', '', $parts[1])
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
function getSharePopupButton($videos_id, $url = "", $title = "")
|
||||
|
@ -7223,11 +7223,11 @@ function showAlertMessage()
|
|||
{
|
||||
$check = ['error', 'msg', 'success', 'toast'];
|
||||
|
||||
$newAlerts = array();
|
||||
$newAlerts = [];
|
||||
|
||||
if (!empty($_SESSION['YPTalertMessage'])) {
|
||||
foreach ($check as $value) {
|
||||
$newAlerts[$value] = array();
|
||||
$newAlerts[$value] = [];
|
||||
}
|
||||
foreach ($_SESSION['YPTalertMessage'] as $value) {
|
||||
if (!empty($value[0])) {
|
||||
|
@ -7569,13 +7569,13 @@ function getSocialModal($videos_id, $url = "", $title = "")
|
|||
$filePath = $global['systemRootPath'] . 'objects/functionGetSocialModal.php';
|
||||
$contents = getIncludeFileContent(
|
||||
$filePath,
|
||||
array(
|
||||
[
|
||||
'videos_id' => $videos_id,
|
||||
'url' => $url,
|
||||
'title' => $title,
|
||||
'video' => $video,
|
||||
'sharingUid' => $sharingUid
|
||||
)
|
||||
]
|
||||
);
|
||||
return ['html' => $contents, 'id' => $sharingUid];
|
||||
}
|
||||
|
@ -7623,7 +7623,7 @@ function getCroppie(
|
|||
$boundaryHeight = $viewportHeight + $boundary;
|
||||
$uid = uniqid();
|
||||
|
||||
$varsArray = array(
|
||||
$varsArray = [
|
||||
'buttonTitle' => $buttonTitle,
|
||||
'callBackJSFunction' => $callBackJSFunction,
|
||||
'resultWidth' => $resultWidth,
|
||||
|
@ -7636,7 +7636,7 @@ function getCroppie(
|
|||
'boundaryWidth' => $boundaryWidth,
|
||||
'boundaryHeight' => $boundaryHeight,
|
||||
'uid' => $uid,
|
||||
);
|
||||
];
|
||||
|
||||
$contents = getIncludeFileContent($global['systemRootPath'] . 'objects/functionCroppie.php', $varsArray);
|
||||
|
||||
|
@ -7710,7 +7710,7 @@ function convertVideoToMP3FileIfNotExists($videos_id)
|
|||
if (empty($video)) {
|
||||
return false;
|
||||
}
|
||||
$types = array('video', 'audio');
|
||||
$types = ['video', 'audio'];
|
||||
if (!in_array($video['type'], $types)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -7914,7 +7914,7 @@ function canFullScreen()
|
|||
function getTinyMCE($id, $simpleMode = false)
|
||||
{
|
||||
global $global;
|
||||
$contents = getIncludeFileContent($global['systemRootPath'] . 'objects/functionsGetTinyMCE.php', array('id' => $id, 'simpleMode' => $simpleMode));
|
||||
$contents = getIncludeFileContent($global['systemRootPath'] . 'objects/functionsGetTinyMCE.php', ['id' => $id, 'simpleMode' => $simpleMode]);
|
||||
return $contents;
|
||||
}
|
||||
|
||||
|
@ -8258,7 +8258,7 @@ function deleteStatsNotifications()
|
|||
|
||||
function getLiveVideosFromUsers_id($users_id)
|
||||
{
|
||||
$videos = array();
|
||||
$videos = [];
|
||||
if (!empty($users_id)) {
|
||||
$stats = getStatsNotifications();
|
||||
foreach ($stats["applications"] as $key => $value) {
|
||||
|
@ -8295,7 +8295,7 @@ function getLiveVideosObject($application)
|
|||
|
||||
$user = new User($application['users_id']);
|
||||
$cat = new Category($application['categories_id']);
|
||||
$video = array(
|
||||
$video = [
|
||||
'id' => intval(rand(999999, 9999999)),
|
||||
'isLive' => 1,
|
||||
'categories_id' => $application['categories_id'],
|
||||
|
@ -8324,7 +8324,7 @@ function getLiveVideosObject($application)
|
|||
'galleryCallback' => @$application['callback'],
|
||||
'stats' => $application,
|
||||
'embedlink' => addQueryStringParameter($application['href'], 'embed', 1),
|
||||
'images' => array(
|
||||
'images' => [
|
||||
"poster" => @$application['poster'],
|
||||
"posterPortrait" => @$application['poster'],
|
||||
"posterPortraitPath" => @$application['poster'],
|
||||
|
@ -8339,16 +8339,16 @@ function getLiveVideosObject($application)
|
|||
"posterLandscapePath" => @$application['poster'],
|
||||
"posterLandscapeThumbs" => @$application['poster'],
|
||||
"posterLandscapeThumbsSmall" => @$application['poster']
|
||||
),
|
||||
'videos' => array(
|
||||
"m3u8" => array(
|
||||
],
|
||||
'videos' => [
|
||||
"m3u8" => [
|
||||
"url" => $m3u8,
|
||||
"url_noCDN" => $m3u8,
|
||||
"type" => "video",
|
||||
"format" => "m3u8",
|
||||
"resolution" => "auto"
|
||||
)
|
||||
),
|
||||
]
|
||||
],
|
||||
'Poster' => @$application['poster'],
|
||||
'Thumbnail' => @$application['poster'],
|
||||
'createdHumanTiming' => 'Live',
|
||||
|
@ -8371,36 +8371,36 @@ function getLiveVideosObject($application)
|
|||
"category_description" => $cat->getDescription(),
|
||||
"videoCreation" => date('Y-m-d H:i:s'),
|
||||
"videoModified" => date('Y-m-d H:i:s'),
|
||||
"groups" => array(),
|
||||
"tags" => array(),
|
||||
"groups" => [],
|
||||
"tags" => [],
|
||||
"videoTags" => [
|
||||
array(
|
||||
[
|
||||
"type_name" => "Starring",
|
||||
"name" => ""
|
||||
),
|
||||
array(
|
||||
],
|
||||
[
|
||||
"type_name" => "Language",
|
||||
"name" => "English"
|
||||
),
|
||||
array(
|
||||
],
|
||||
[
|
||||
"type_name" => "Release_Date",
|
||||
"name" => date('Y')
|
||||
),
|
||||
array(
|
||||
],
|
||||
[
|
||||
"type_name" => "Running_Time",
|
||||
"name" => ""
|
||||
),
|
||||
array(
|
||||
],
|
||||
[
|
||||
"type_name" => "Genres",
|
||||
"name" => $cat->getName()
|
||||
)
|
||||
]
|
||||
],
|
||||
"videoTagsObject" => array('Starring' => array(), 'Language' => array("English"), 'Release_Date' => array(date('Y')), 'Running_Time' => array('0'), 'Genres' => array($cat->getName())),
|
||||
"videoTagsObject" => ['Starring' => [], 'Language' => ["English"], 'Release_Date' => [date('Y')], 'Running_Time' => ['0'], 'Genres' => [$cat->getName()]],
|
||||
'descriptionHTML' => '',
|
||||
"progress" => array(
|
||||
"progress" => [
|
||||
"percent" => 0,
|
||||
"lastVideoTime" => 0
|
||||
),
|
||||
],
|
||||
"isFavorite" => null,
|
||||
"isWatchLater" => null,
|
||||
"favoriteId" => null,
|
||||
|
@ -8425,7 +8425,7 @@ function getLiveVideosObject($application)
|
|||
"wwbnChannelURL" => $user->getChannelLink(),
|
||||
"wwbnImgChannel" => $user->getPhoto(),
|
||||
"wwbnType" => "live",
|
||||
);
|
||||
];
|
||||
//var_dump($videos);exit;
|
||||
return $video;
|
||||
}
|
||||
|
@ -8433,7 +8433,7 @@ function getLiveVideosObject($application)
|
|||
function getLiveVideosFromCategory($categories_id)
|
||||
{
|
||||
$stats = getStatsNotifications();
|
||||
$videos = array();
|
||||
$videos = [];
|
||||
if (!empty($categories_id)) {
|
||||
foreach ($stats["applications"] as $key => $value) {
|
||||
if (empty($value['categories_id']) || $categories_id != $value['categories_id']) {
|
||||
|
@ -8511,7 +8511,7 @@ function getStatsNotifications($force_recreate = false, $listItIfIsAdminOrOwner
|
|||
$count++;
|
||||
}
|
||||
if (!empty($json['applications'])) {
|
||||
$applications = array();
|
||||
$applications = [];
|
||||
foreach ($json['applications'] as $key => $value) {
|
||||
// remove duplicated
|
||||
if (!is_array($value) || empty($value['href']) || in_array($value['href'], $applications)) {
|
||||
|
@ -8534,7 +8534,7 @@ function getStatsNotifications($force_recreate = false, $listItIfIsAdminOrOwner
|
|||
}
|
||||
|
||||
if (empty($json['applications'])) {
|
||||
$json['applications'] = array();
|
||||
$json['applications'] = [];
|
||||
}
|
||||
|
||||
foreach ($json['applications'] as $key => $value) {
|
||||
|
@ -8648,7 +8648,7 @@ function getLiveUsersLabelHTML($viewsClass = "label label-default", $counterClas
|
|||
$_getLiveUsersLabelHTML = 1;
|
||||
$htmlMediaTag = '';
|
||||
$htmlMediaTag .= '<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);" class="liveUsersLabel">';
|
||||
$htmlMediaTag .= getIncludeFileContent($global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php', array('viewsClass' => $viewsClass, 'counterClass' => $counterClass));
|
||||
$htmlMediaTag .= getIncludeFileContent($global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php', ['viewsClass' => $viewsClass, 'counterClass' => $counterClass]);
|
||||
$htmlMediaTag .= getLiveUsersLabel($viewsClass, $counterClass);
|
||||
$htmlMediaTag .= '</div>';
|
||||
return $htmlMediaTag;
|
||||
|
@ -9020,7 +9020,7 @@ function getHashMethodsAndInfo()
|
|||
$iv = substr($saltMD5, 0, $ivlen);
|
||||
$key = substr($saltMD5, 0, $keylen);
|
||||
|
||||
$_getHashMethod = array('cipher_algo' => $cipher_algo, 'iv' => $iv, 'key' => $key, 'base' => $base, 'salt' => $global['salt']);
|
||||
$_getHashMethod = ['cipher_algo' => $cipher_algo, 'iv' => $iv, 'key' => $key, 'base' => $base, 'salt' => $global['salt']];
|
||||
}
|
||||
return $_getHashMethod;
|
||||
}
|
||||
|
@ -9049,7 +9049,7 @@ function idToHash($id)
|
|||
$hash = preg_replace('/(=+)$/', '', $hash);
|
||||
$hash = str_replace(['/', '+', '='], ['_', '-', '.'], $hash);
|
||||
if (empty($hash)) {
|
||||
_error_log('idToHash error: ' . openssl_error_string() . PHP_EOL . json_encode(array('id' => $id, 'cipher_algo' => $cipher_algo, 'base' => $base, 'idConverted' => $idConverted, 'hash' => $hash, 'iv' => $iv)));
|
||||
_error_log('idToHash error: ' . openssl_error_string() . PHP_EOL . json_encode(['id' => $id, 'cipher_algo' => $cipher_algo, 'base' => $base, 'idConverted' => $idConverted, 'hash' => $hash, 'iv' => $iv]));
|
||||
if (!empty($global['useLongHash'])) {
|
||||
$global['useLongHash'] = 0;
|
||||
return idToHash($id);
|
||||
|
@ -9663,7 +9663,7 @@ function isHTMLEmpty($html_string)
|
|||
{
|
||||
$html_string_no_tags = strip_specific_tags($html_string, ['br', 'p', 'span', 'div']);
|
||||
//var_dump($html_string_no_tags, $html_string);
|
||||
return empty(trim(str_replace(array("\r", "\n"), array('', ''), $html_string_no_tags)));
|
||||
return empty(trim(str_replace(["\r", "\n"], ['', ''], $html_string_no_tags)));
|
||||
}
|
||||
|
||||
function emptyHTML($html_string)
|
||||
|
@ -9766,7 +9766,7 @@ function isDummyFile($filePath)
|
|||
global $_isDummyFile;
|
||||
|
||||
if (!isset($_isDummyFile)) {
|
||||
$_isDummyFile = array();
|
||||
$_isDummyFile = [];
|
||||
}
|
||||
if (isset($_isDummyFile[$filePath])) {
|
||||
return $_isDummyFile[$filePath];
|
||||
|
@ -9799,7 +9799,7 @@ function forbiddenPageIfCannotEmbed($videos_id)
|
|||
if (!isAVideoMobileApp()) {
|
||||
if (!isSameDomain(@$_SERVER['HTTP_REFERER'], $global['webSiteRootURL'])) {
|
||||
if (!empty($advancedCustomUser->blockEmbedFromSharedVideos) && !CustomizeUser::canShareVideosFromVideo($videos_id)) {
|
||||
$reason = array();
|
||||
$reason = [];
|
||||
if (!empty($advancedCustomUser->blockEmbedFromSharedVideos)) {
|
||||
error_log("forbiddenPageIfCannotEmbed: Embed is forbidden: \$advancedCustomUser->blockEmbedFromSharedVideos");
|
||||
$reason[] = __('Admin block video sharing');
|
||||
|
@ -9825,9 +9825,9 @@ function getMediaSessionPosters($imagePath)
|
|||
if (empty($imagePath) || !file_exists($imagePath)) {
|
||||
return false;
|
||||
}
|
||||
$sizes = array(96, 128, 192, 256, 384, 512);
|
||||
$sizes = [96, 128, 192, 256, 384, 512];
|
||||
|
||||
$posters = array();
|
||||
$posters = [];
|
||||
|
||||
foreach ($sizes as $value) {
|
||||
$destination = str_replace('.jpg', "_{$value}.jpg", $imagePath);
|
||||
|
@ -9836,7 +9836,7 @@ function getMediaSessionPosters($imagePath)
|
|||
$convertedImage = convertImageIfNotExists($imagePath, $destination, $value, $value);
|
||||
$relativePath = str_replace($global['systemRootPath'], '', $convertedImage);
|
||||
$url = getURL($relativePath);
|
||||
$posters[$value] = array('path' => $path, 'relativePath' => $relativePath, 'url' => $url);
|
||||
$posters[$value] = ['path' => $path, 'relativePath' => $relativePath, 'url' => $url];
|
||||
}
|
||||
}
|
||||
return $posters;
|
||||
|
@ -9847,7 +9847,7 @@ function deleteMediaSessionPosters($imagePath)
|
|||
if (empty($imagePath)) {
|
||||
return false;
|
||||
}
|
||||
$sizes = array(96, 128, 192, 256, 384, 512);
|
||||
$sizes = [96, 128, 192, 256, 384, 512];
|
||||
|
||||
foreach ($sizes as $value) {
|
||||
$destination = str_replace('.jpg', "_{$value}.jpg", $imagePath);
|
||||
|
@ -9919,7 +9919,7 @@ function _ob_get_clean()
|
|||
return $content;
|
||||
}
|
||||
|
||||
function getIncludeFileContent($filePath, $varsArray = array())
|
||||
function getIncludeFileContent($filePath, $varsArray = [])
|
||||
{
|
||||
global $global, $config;
|
||||
if (!empty($global['getIncludeFileContent'])) {
|
||||
|
@ -9929,7 +9929,7 @@ function getIncludeFileContent($filePath, $varsArray = array())
|
|||
}
|
||||
}
|
||||
|
||||
function getIncludeFileContentV1($filePath, $varsArray = array())
|
||||
function getIncludeFileContentV1($filePath, $varsArray = [])
|
||||
{
|
||||
global $global, $config;
|
||||
foreach ($varsArray as $key => $value) {
|
||||
|
@ -9967,7 +9967,7 @@ function getIncludeFileContentV1($filePath, $varsArray = array())
|
|||
return $return;
|
||||
}
|
||||
|
||||
function getIncludeFileContentV2($filePath, $varsArray = array())
|
||||
function getIncludeFileContentV2($filePath, $varsArray = [])
|
||||
{
|
||||
global $global, $config;
|
||||
foreach ($varsArray as $key => $value) {
|
||||
|
@ -10074,7 +10074,7 @@ function getValidCrontabLines()
|
|||
if (empty($validCrontabLines)) {
|
||||
$crontab = shell_exec('crontab -l');
|
||||
$crontabLines = preg_split("/\r\n|\n|\r/", $crontab);
|
||||
$_validCrontabLines = array();
|
||||
$_validCrontabLines = [];
|
||||
|
||||
foreach ($crontabLines as $line) {
|
||||
$line = trim($line);
|
||||
|
@ -10094,12 +10094,12 @@ function getValidCrontabLines()
|
|||
function is_email($strOrArray)
|
||||
{
|
||||
if (empty($strOrArray)) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
if (!is_array($strOrArray)) {
|
||||
$strOrArray = array($strOrArray);
|
||||
$strOrArray = [$strOrArray];
|
||||
}
|
||||
$valid_emails = array();
|
||||
$valid_emails = [];
|
||||
foreach ($strOrArray as $email) {
|
||||
if (is_numeric($email)) {
|
||||
$email = User::getEmailDb($email);
|
||||
|
@ -10123,10 +10123,10 @@ function getHamburgerButton($id = '', $type = 0, $parameters = 'class="btn btn-d
|
|||
{
|
||||
global $global;
|
||||
if ($type === 'x') {
|
||||
$XOptions = array(1, 4, 6, 7, 8);
|
||||
$XOptions = [1, 4, 6, 7, 8];
|
||||
$type = $XOptions[rand(0, 4)];
|
||||
} else if ($type === '<-') {
|
||||
$XOptions = array(2, 5);
|
||||
$XOptions = [2, 5];
|
||||
$type = $XOptions[rand(0, 1)];
|
||||
}
|
||||
$type = intval($type);
|
||||
|
@ -10137,7 +10137,7 @@ function getHamburgerButton($id = '', $type = 0, $parameters = 'class="btn btn-d
|
|||
$id = uniqid();
|
||||
}
|
||||
$filePath = $global['systemRootPath'] . 'objects/functionGetHamburgerButton.php';
|
||||
return getIncludeFileContent($filePath, array('type' => $type, 'id' => $id, 'parameters' => $parameters, 'startActive' => $startActive, 'invert' => $invert));
|
||||
return getIncludeFileContent($filePath, ['type' => $type, 'id' => $id, 'parameters' => $parameters, 'startActive' => $startActive, 'invert' => $invert]);
|
||||
}
|
||||
|
||||
function getUserOnlineLabel($users_id, $class = '', $style = '')
|
||||
|
@ -10411,9 +10411,9 @@ function addTwitterJS($text)
|
|||
|
||||
function getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type)
|
||||
{
|
||||
$downloadOptions = array();
|
||||
$downloadOptions = [];
|
||||
if (empty($videos_id)) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
if (empty($video_type)) {
|
||||
$video = Video::getVideoLight($videos_id);
|
||||
|
@ -10503,7 +10503,7 @@ function getIframePaths()
|
|||
$url = addQueryStringParameter($url, $key, $value);
|
||||
}
|
||||
|
||||
return array('relative' => $relativeSRC, 'url' => $url, 'path' => "{$global['systemRootPath']}{$relativeSRC}", 'modeYoutube' => $modeYoutube);
|
||||
return ['relative' => $relativeSRC, 'url' => $url, 'path' => "{$global['systemRootPath']}{$relativeSRC}", 'modeYoutube' => $modeYoutube];
|
||||
}
|
||||
|
||||
function getFeedButton($rss, $mrss, $roku)
|
||||
|
@ -10551,7 +10551,7 @@ function isSafari()
|
|||
|
||||
function fixQuotes($str)
|
||||
{
|
||||
$chr_map = array(
|
||||
$chr_map = [
|
||||
// Windows codepage 1252
|
||||
"\xC2\x82" => "'", // U+0082⇒U+201A single low-9 quotation mark
|
||||
"\xC2\x84" => '"', // U+0084⇒U+201E double low-9 quotation mark
|
||||
|
@ -10575,7 +10575,7 @@ function fixQuotes($str)
|
|||
"\xE2\x80\x9F" => '"', // U+201F double high-reversed-9 quotation mark
|
||||
"\xE2\x80\xB9" => "'", // U+2039 single left-pointing angle quotation mark
|
||||
"\xE2\x80\xBA" => "'", // U+203A single right-pointing angle quotation mark
|
||||
);
|
||||
];
|
||||
$chr = array_keys($chr_map); // but: for efficiency you should
|
||||
$rpl = array_values($chr_map); // pre-calculate these two arrays
|
||||
$str = str_replace($chr, $rpl, html_entity_decode($str, ENT_QUOTES, "UTF-8"));
|
||||
|
|
|
@ -10,18 +10,18 @@ header('Content-Type: application/json');
|
|||
$_POST['current'] = 1;
|
||||
$_REQUEST['rowCount'] = 10;
|
||||
|
||||
$response = array();
|
||||
$response = [];
|
||||
|
||||
if(preg_match('/^@/', $_REQUEST['term'])){
|
||||
$_GET['searchPhrase'] = xss_esc(substr($_REQUEST['term'], 1));
|
||||
$ignoreAdmin = true;
|
||||
$users = User::getAllUsers($ignoreAdmin, ['name', 'email', 'user', 'channelName'], 'a');
|
||||
foreach ($users as $key => $value) {
|
||||
$response[] = array(
|
||||
$response[] = [
|
||||
'id'=>$value['id'],
|
||||
'value'=>$value['identification'],
|
||||
'label'=>Video::getCreatorHTML($value['id'], '', true, true)
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ class PlayList extends ObjectYPT {
|
|||
}
|
||||
} else {
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ class PlayList extends ObjectYPT {
|
|||
if ($res !== false) {
|
||||
foreach ($fullData as $row) {
|
||||
$row = cleanUpRowFromDatabase($row);
|
||||
$row['videos'] = array();
|
||||
$row['videos'] = [];
|
||||
if ($onlyWithVideos) {
|
||||
$row['videos'] = self::getVideosIDFromPlaylistLight($row['id']);
|
||||
if (empty($row['videos'])) {
|
||||
|
@ -270,7 +270,7 @@ class PlayList extends ObjectYPT {
|
|||
}
|
||||
} else {
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ class PlayList extends ObjectYPT {
|
|||
}
|
||||
} else {
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
$getVideosIDFromPlaylistLight[$playlists_id] = $rows;
|
||||
return $rows;
|
||||
|
@ -457,7 +457,7 @@ class PlayList extends ObjectYPT {
|
|||
$cache = self::setCache($cacheName, $rows);
|
||||
} else {
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
} else {
|
||||
$rows = object_to_array($rows);
|
||||
|
@ -840,7 +840,7 @@ class PlayList extends ObjectYPT {
|
|||
}
|
||||
} else {
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ require_once $global['systemRootPath'] . 'videos/configuration.php';
|
|||
require_once './playlist.php';
|
||||
header('Content-Type: application/json');
|
||||
if(is_array($_POST['videos_id'])){
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
foreach ($_POST['videos_id'] as $value) {
|
||||
$rows[] = array('videos_id'=>$value, 'playlists'=>PlayList::getAllFromUserVideo($_POST['users_id'], $value, false));
|
||||
$rows[] = ['videos_id'=>$value, 'playlists'=>PlayList::getAllFromUserVideo($_POST['users_id'], $value, false)];
|
||||
}
|
||||
echo json_encode($rows);
|
||||
}else{
|
||||
|
|
|
@ -80,12 +80,12 @@ foreach ($scanVars as $value) {
|
|||
if (!empty($scanThis[$value])) {
|
||||
if (is_string($scanThis[$value])) {
|
||||
$scanThis[$value] = fixQuotesIfSafari($scanThis[$value]);
|
||||
$scanThis[$value] = str_replace(array("'","`"), array('', ''), trim($scanThis[$value]));
|
||||
$scanThis[$value] = str_replace(["'","`"], ['', ''], trim($scanThis[$value]));
|
||||
} elseif (is_array($scanThis[$value])) {
|
||||
foreach ($scanThis[$value] as $key => $value2) {
|
||||
if (is_string($scanThis[$value][$key])) {
|
||||
$scanThis[$value] = fixQuotesIfSafari($scanThis[$value]);
|
||||
$scanThis[$value][$key] = str_replace(array("'","`"), array('', ''), trim($scanThis[$value][$key]));
|
||||
$scanThis[$value][$key] = str_replace(["'","`"], ['', ''], trim($scanThis[$value][$key]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ $obj->imagePNG = "{$obj->imageJPG}.png";
|
|||
|
||||
$obj->imagePNGResponse = saveCroppieImage($obj->imagePNG, "image");
|
||||
$obj->imageJPGResponse = convertImage($obj->imagePNG, $obj->imageJPG, 70);
|
||||
$obj->variations = array();
|
||||
$obj->variations = [];
|
||||
//var_dump($obj);
|
||||
if (file_exists($obj->imagePNG)) {
|
||||
unlink($obj->imagePNG);
|
||||
|
|
|
@ -55,16 +55,16 @@ class User {
|
|||
public static $channel_artDesktopMax = 'desktop_max';
|
||||
public static $channel_artTablet = 'tablet';
|
||||
public static $channel_artDesktopMin = 'desktop_min';
|
||||
public static $channel_art = array(
|
||||
'TV' => array('tv', 2550, 1440),
|
||||
'DesktopMax' => array('desktop_max', 2550, 423),
|
||||
'tablet' => array('tablet', 1855, 423),
|
||||
'DesktopMin' => array('desktop_min', 1546, 423)
|
||||
);
|
||||
public static $channel_art = [
|
||||
'TV' => ['tv', 2550, 1440],
|
||||
'DesktopMax' => ['desktop_max', 2550, 423],
|
||||
'tablet' => ['tablet', 1855, 423],
|
||||
'DesktopMin' => ['desktop_min', 1546, 423]
|
||||
];
|
||||
public static $is_company_status_NOTCOMPANY = 0;
|
||||
public static $is_company_status_ISACOMPANY = 1;
|
||||
public static $is_company_status_WAITINGAPPROVAL = 2;
|
||||
public static $is_company_status = array(0 => 'Not a Company', 1 => 'Active Company', 2 => 'Company waiting for approval');
|
||||
public static $is_company_status = [0 => 'Not a Company', 1 => 'Active Company', 2 => 'Company waiting for approval'];
|
||||
|
||||
public function __construct($id, $user = "", $password = "") {
|
||||
if (empty($id)) {
|
||||
|
@ -940,13 +940,13 @@ if (typeof gtag !== \"function\") {
|
|||
global $global;
|
||||
if (!empty($this->id)) {
|
||||
|
||||
$arrayTables = array(
|
||||
$arrayTables = [
|
||||
//'live_transmition_history_log',
|
||||
'live_transmitions',
|
||||
'users_login_history',
|
||||
'audit',
|
||||
'ppvlive_purchases',
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($arrayTables as $value) {
|
||||
$sql = "DELETE FROM {$value} WHERE users_id = ?";
|
||||
|
@ -1198,7 +1198,7 @@ if (typeof gtag !== \"function\") {
|
|||
|
||||
if (!empty($users_id)) {
|
||||
if (!isset($_is_a_company)) {
|
||||
$_is_a_company = array();
|
||||
$_is_a_company = [];
|
||||
}
|
||||
if (!isset($_is_a_company[$users_id])) {
|
||||
$user = new User($users_id);
|
||||
|
@ -1282,7 +1282,7 @@ if (typeof gtag !== \"function\") {
|
|||
}
|
||||
$can = !empty($this->isAdmin) || !empty($this->canStream);
|
||||
if(empty($can)){
|
||||
$reasons = array();
|
||||
$reasons = [];
|
||||
if(empty($this->isAdmin)){
|
||||
$reasons[] = 'User is not admin';
|
||||
}
|
||||
|
@ -2374,7 +2374,7 @@ if (typeof gtag !== \"function\") {
|
|||
return false;
|
||||
}
|
||||
if (!isset($_sendVerificationLink_sent)) {
|
||||
$_sendVerificationLink_sent = array();
|
||||
$_sendVerificationLink_sent = [];
|
||||
}
|
||||
//Only send the verification email each 30 minutes
|
||||
if (!empty($_sendVerificationLink_sent[$users_id])) {
|
||||
|
@ -2468,7 +2468,7 @@ if (typeof gtag !== \"function\") {
|
|||
}
|
||||
|
||||
if (!isset($_createVerificationCode)) {
|
||||
$_createVerificationCode = array();
|
||||
$_createVerificationCode = [];
|
||||
}
|
||||
|
||||
if (empty($_createVerificationCode[$users_id])) {
|
||||
|
@ -2973,7 +2973,7 @@ if (typeof gtag !== \"function\") {
|
|||
$value = $user->getExternalOptions('DonationButtons');
|
||||
$json = _json_decode($value);
|
||||
if (empty($json)) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
return $json;
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ class UserGroups{
|
|||
}
|
||||
|
||||
if(!isset($__getUserGroups)){
|
||||
$__getUserGroups = array();
|
||||
$__getUserGroups = [];
|
||||
}
|
||||
|
||||
if(isset($__getUserGroups[$users_id])){
|
||||
|
@ -403,7 +403,7 @@ class UserGroups{
|
|||
return false;
|
||||
}
|
||||
if (!is_array($array_groups_id)) {
|
||||
$array_groups_id = array($array_groups_id);
|
||||
$array_groups_id = [$array_groups_id];
|
||||
}
|
||||
|
||||
if ($mergeWithCurrentUserGroups) {
|
||||
|
@ -482,12 +482,12 @@ class UserGroups{
|
|||
global $_getVideosAndCategoriesUserGroups;
|
||||
|
||||
if(!isset($_getVideosAndCategoriesUserGroups)){
|
||||
$_getVideosAndCategoriesUserGroups = array();
|
||||
$_getVideosAndCategoriesUserGroups = [];
|
||||
}
|
||||
if(!empty($force) || !isset($_getVideosAndCategoriesUserGroups[$videos_id])){
|
||||
$videosug = self::getVideoGroups($videos_id);
|
||||
$categoriessug = self::getCategoriesGroups($videos_id);
|
||||
$response = array();
|
||||
$response = [];
|
||||
foreach ($videosug as $value) {
|
||||
$value['isVideoUserGroup'] = 1;
|
||||
$value['isCategoryUserGroup'] = 0;
|
||||
|
|
|
@ -19,10 +19,10 @@ if (!empty($_REQUEST['users_id'])) {
|
|||
//echo __LINE__, PHP_EOL;
|
||||
$user = User::getUserFromID($_REQUEST['users_id']);
|
||||
if (!empty($user)) {
|
||||
$users = array($user);
|
||||
$users = [$user];
|
||||
$total = 1;
|
||||
} else {
|
||||
$users = array();
|
||||
$users = [];
|
||||
$total = 0;
|
||||
}
|
||||
} else if (empty($_REQUEST['user_groups_id'])) {
|
||||
|
@ -59,7 +59,7 @@ if (empty($users)) {
|
|||
} else {
|
||||
foreach ($users as $key => $value) {
|
||||
if(!$canAdminUsers){
|
||||
$u = array();
|
||||
$u = [];
|
||||
$u['id'] = $value['id'];
|
||||
//$u['user'] = $user['user'];
|
||||
$u['identification'] = $value['identification'];
|
||||
|
|
|
@ -1242,7 +1242,7 @@ if (!class_exists('Video')) {
|
|||
public static function getAllVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = [], $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true, $suggestedOnly = false, $is_serie = null, $type = '') {
|
||||
global $global, $config, $advancedCustom, $advancedCustomUser;
|
||||
if ($config->currentVersionLowerThen('11.7')) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
$tolerance = 0.5;
|
||||
/**
|
||||
|
@ -1482,7 +1482,7 @@ if (!class_exists('Video')) {
|
|||
|
||||
TimeLogEnd($timeLogName, __LINE__, 0.2);
|
||||
|
||||
$allowedDurationTypes = array('video', 'audio');
|
||||
$allowedDurationTypes = ['video', 'audio'];
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1654,9 +1654,9 @@ if (!class_exists('Video')) {
|
|||
$MediaMetadata->title = $video['title'];
|
||||
$MediaMetadata->artist = $video['identification'];
|
||||
$MediaMetadata->album = $video['category'];
|
||||
$MediaMetadata->artwork = array();
|
||||
$MediaMetadata->artwork = [];
|
||||
foreach ($posters as $key => $value) {
|
||||
$MediaMetadata->artwork[] = array('src' => $value['url'], 'sizes' => "{$key}x{$key}", 'type' => 'image/jpg');
|
||||
$MediaMetadata->artwork[] = ['src' => $value['url'], 'sizes' => "{$key}x{$key}", 'type' => 'image/jpg'];
|
||||
}
|
||||
return $MediaMetadata;
|
||||
}
|
||||
|
@ -1771,7 +1771,7 @@ if (!class_exists('Video')) {
|
|||
public static function getAllVideosLight($status = "viewable", $showOnlyLoggedUserVideos = false, $showUnlisted = false, $suggestedOnly = false, $type = '') {
|
||||
global $global, $config;
|
||||
if ($config->currentVersionLowerThen('5')) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
$status = str_replace("'", "", $status);
|
||||
if ($status === 'suggested') {
|
||||
|
@ -1861,7 +1861,7 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
//$videos = $res->fetch_all(MYSQLI_ASSOC);
|
||||
} else {
|
||||
$videos = array();
|
||||
$videos = [];
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
return $videos;
|
||||
|
@ -2039,10 +2039,10 @@ if (!class_exists('Video')) {
|
|||
if ($advancedCustomUser->videosSearchAlsoSearchesOnChannelName) {
|
||||
$searchFieldsNames[] = 'u.channelName';
|
||||
}
|
||||
$newSearchFieldsNames = array();
|
||||
$newSearchFieldsNames = [];
|
||||
if (!empty($_REQUEST['searchFieldsNames'])) {
|
||||
if (!is_array($_REQUEST['searchFieldsNames'])) {
|
||||
$_REQUEST['searchFieldsNames'] = array($_REQUEST['searchFieldsNames']);
|
||||
$_REQUEST['searchFieldsNames'] = [$_REQUEST['searchFieldsNames']];
|
||||
}
|
||||
foreach ($_REQUEST['searchFieldsNames'] as $value) {
|
||||
if (in_array($value, $searchFieldsNames)) {
|
||||
|
@ -2606,10 +2606,10 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
|
||||
// if you're not admin you can only manage your videos
|
||||
$users_id = array($this->users_id, $this->users_id_company);
|
||||
$users_id = [$this->users_id, $this->users_id_company];
|
||||
if ($advancedCustomUser->userCanChangeVideoOwner) {
|
||||
$video = new Video("", "", $this->id); // query again to make sure the user is not changing the owner
|
||||
$users_id = array($video->getUsers_id(), $video->getUsers_id_company());
|
||||
$users_id = [$video->getUsers_id(), $video->getUsers_id_company()];
|
||||
}
|
||||
//var_dump(User::getId(), $users_id, $video, $this);
|
||||
if (!in_array(User::getId(), $users_id)) {
|
||||
|
@ -2681,7 +2681,7 @@ if (!class_exists('Video')) {
|
|||
if (empty($value2->label) || empty($value2->text)) {
|
||||
continue;
|
||||
}
|
||||
$valid_tags = array(__("Paid Content"), __("Group"), __("Plugin"), __("Rating"));
|
||||
$valid_tags = [__("Paid Content"), __("Group"), __("Plugin"), __("Rating")];
|
||||
if (!in_array($value2->label, $valid_tags)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2844,7 +2844,7 @@ if (!class_exists('Video')) {
|
|||
//$objTag->text = __("Public");
|
||||
}
|
||||
} else {
|
||||
$groupNames = array();
|
||||
$groupNames = [];
|
||||
foreach ($groups as $value) {
|
||||
$groupNames[] = $value['group_name'];
|
||||
}
|
||||
|
@ -4376,9 +4376,9 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
|
||||
if (defaultIsLandscape()) {
|
||||
$return->default = array('url' => $return->posterLandscape, 'path' => $return->posterLandscapePath);
|
||||
$return->default = ['url' => $return->posterLandscape, 'path' => $return->posterLandscapePath];
|
||||
} else {
|
||||
$return->default = array('url' => $return->posterPortrait, 'path' => $return->posterPortraitPath);
|
||||
$return->default = ['url' => $return->posterPortrait, 'path' => $return->posterPortraitPath];
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
@ -5172,7 +5172,7 @@ if (!class_exists('Video')) {
|
|||
*/
|
||||
$status = $video->getStatus();
|
||||
|
||||
$buttons = array();
|
||||
$buttons = [];
|
||||
$totalStatusButtons = count($statusThatTheUserCanUpdate);
|
||||
foreach ($statusThatTheUserCanUpdate as $key => $value) {
|
||||
$index = $key + 1;
|
||||
|
@ -5651,7 +5651,7 @@ if (!class_exists('Video')) {
|
|||
global $advancedCustom, $_getSeoTags;
|
||||
|
||||
if (!isset($_getSeoTags)) {
|
||||
$_getSeoTags = array();
|
||||
$_getSeoTags = [];
|
||||
}
|
||||
|
||||
if (!empty($_getSeoTags[$videos_id])) {
|
||||
|
@ -5687,23 +5687,23 @@ if (!class_exists('Video')) {
|
|||
|
||||
$image = Video::getImageFromID($videos_id);
|
||||
|
||||
$tags = array(
|
||||
$tags = [
|
||||
'h1' => $H1_title,
|
||||
'h2' => $H2_Short_summary,
|
||||
);
|
||||
$meta = array(
|
||||
];
|
||||
$meta = [
|
||||
'description' => $MetaDescription,
|
||||
'keywords' => $keywords,
|
||||
'author' => User::getNameIdentificationById($video->getUsers_id())
|
||||
);
|
||||
$itemprops = array(
|
||||
];
|
||||
$itemprops = [
|
||||
'name' => $H1_title,
|
||||
'thumbnailUrl' => $image->default['url'],
|
||||
'contentURL' => Video::getLink($videos_id, $video->getClean_title()),
|
||||
'embedURL' => Video::getLink($videos_id, $video->getClean_title(), true),
|
||||
'uploadDate' => $video->getCreated(),
|
||||
'description' => $MetaDescription
|
||||
);
|
||||
];
|
||||
|
||||
$head = '';
|
||||
foreach ($meta as $key => $value) {
|
||||
|
@ -5727,8 +5727,8 @@ if (!class_exists('Video')) {
|
|||
$body .= "<span itemprop=\"{$key}\" content=\"" . str_replace('"', '', $value) . "\"></span>";
|
||||
}
|
||||
$body .= '</div>';
|
||||
$response = array();
|
||||
$response['assets'] = array('tags' => $tags, 'meta' => $meta, 'itemprops' => $itemprops);
|
||||
$response = [];
|
||||
$response['assets'] = ['tags' => $tags, 'meta' => $meta, 'itemprops' => $itemprops];
|
||||
$response['head'] = $head;
|
||||
$response['body'] = $body;
|
||||
$_getSeoTags[$videos_id] = $response;
|
||||
|
@ -5769,12 +5769,12 @@ if (!class_exists('Video')) {
|
|||
global $config, $_getEPG;
|
||||
|
||||
if (!isset($_getEPG)) {
|
||||
$_getEPG = array();
|
||||
$_getEPG = [];
|
||||
}
|
||||
|
||||
if (!isset($_getEPG[$videos_id])) {
|
||||
$sql = "SELECT * FROM `videos` WHERE id = ? AND `type` = 'linkVideo' AND epg_link IS NOT NULL AND epg_link != ''";
|
||||
$res = sqlDAL::readSql($sql, 'i', array($videos_id));
|
||||
$res = sqlDAL::readSql($sql, 'i', [$videos_id]);
|
||||
|
||||
$video = sqlDAL::fetchAssoc($res);
|
||||
sqlDAL::close($res);
|
||||
|
@ -5810,7 +5810,7 @@ if (!empty($_GET['v']) && empty($_GET['videoName'])) {
|
|||
$_GET['videoName'] = Video::get_clean_title($_GET['v']);
|
||||
}
|
||||
|
||||
$statusThatShowTheCompleteMenu = array(
|
||||
$statusThatShowTheCompleteMenu = [
|
||||
Video::$statusActive,
|
||||
Video::$statusInactive,
|
||||
Video::$statusScheduledReleaseDate,
|
||||
|
@ -5818,9 +5818,9 @@ $statusThatShowTheCompleteMenu = array(
|
|||
Video::$statusUnlistedButSearchable,
|
||||
Video::$statusUnlisted,
|
||||
Video::$statusFansOnly,
|
||||
);
|
||||
];
|
||||
|
||||
$statusSearchFilter = array(
|
||||
$statusSearchFilter = [
|
||||
Video::$statusActive,
|
||||
Video::$statusInactive,
|
||||
Video::$statusScheduledReleaseDate,
|
||||
|
@ -5829,11 +5829,11 @@ $statusSearchFilter = array(
|
|||
Video::$statusUnlisted,
|
||||
Video::$statusUnlistedButSearchable,
|
||||
Video::$statusBrokenMissingFiles,
|
||||
);
|
||||
];
|
||||
|
||||
$statusThatTheUserCanUpdate = array(
|
||||
array(Video::$statusActive, '#0A0'),
|
||||
array(Video::$statusInactive, '#B00'),
|
||||
array(Video::$statusUnlisted, '#AAA'),
|
||||
array(Video::$statusUnlistedButSearchable, '#BBB'),
|
||||
);
|
||||
$statusThatTheUserCanUpdate = [
|
||||
[Video::$statusActive, '#0A0'],
|
||||
[Video::$statusInactive, '#B00'],
|
||||
[Video::$statusUnlisted, '#AAA'],
|
||||
[Video::$statusUnlistedButSearchable, '#BBB'],
|
||||
];
|
||||
|
|
|
@ -8,8 +8,8 @@ if (!isset($global['systemRootPath'])) {
|
|||
$obj = new stdClass();
|
||||
$obj->msg = '';
|
||||
$obj->error = true;
|
||||
$obj->idsToSave = array();
|
||||
$obj->idSaved = array();
|
||||
$obj->idsToSave = [];
|
||||
$obj->idSaved = [];
|
||||
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
if (!Permissions::canModerateVideos()) {
|
||||
|
|
|
@ -606,7 +606,7 @@ class VideoStatistic extends ObjectYPT {
|
|||
}
|
||||
} else {
|
||||
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
@ -667,7 +667,7 @@ class VideoStatistic extends ObjectYPT {
|
|||
$res = sqlDAL::readSql($sql, $formats, $values);
|
||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||
sqlDAL::close($res);
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
if ($res != false) {
|
||||
$totalViews = 0;
|
||||
$totalWatchingTime = 0;
|
||||
|
|
|
@ -40,14 +40,14 @@ $type = '';
|
|||
if($advancedCustomUser->showArticlesTab && AVideoPlugin::isEnabledByName('Articles')){
|
||||
$uploadedTotalArticles = Video::getTotalVideos($status, $user_id, !isToHidePrivateVideos(), $showUnlisted, true, false, 'article');
|
||||
if(!empty($uploadedTotalArticles)){
|
||||
$uploadedArticles = Video::getAllVideos($status, $user_id, !isToHidePrivateVideos(), array(), false, $showUnlisted, true, false, null, 'article');
|
||||
$uploadedArticles = Video::getAllVideos($status, $user_id, !isToHidePrivateVideos(), [], false, $showUnlisted, true, false, null, 'article');
|
||||
}
|
||||
$type = 'notArticle';
|
||||
}
|
||||
if($advancedCustomUser->showAudioTab){
|
||||
$uploadedTotalAudio = Video::getTotalVideos($status, $user_id, !isToHidePrivateVideos(), $showUnlisted, true, false, 'audio');
|
||||
if(!empty($uploadedTotalAudio)){
|
||||
$uploadedAudio = Video::getAllVideos($status, $user_id, !isToHidePrivateVideos(), array(), false, $showUnlisted, true, false, null, 'audio');
|
||||
$uploadedAudio = Video::getAllVideos($status, $user_id, !isToHidePrivateVideos(), [], false, $showUnlisted, true, false, null, 'audio');
|
||||
}
|
||||
//var_dump($uploadedAudio);exit;
|
||||
if(empty($type)){
|
||||
|
@ -57,10 +57,10 @@ if($advancedCustomUser->showAudioTab){
|
|||
}
|
||||
}
|
||||
//var_dump($uploadedArticles);exit;
|
||||
$uploadedVideos = array();
|
||||
$uploadedVideos = [];
|
||||
$uploadedTotalVideos = Video::getTotalVideos($status, $user_id, !isToHidePrivateVideos(), $showUnlisted, true, false, $type);
|
||||
if(!empty($uploadedTotalVideos)){
|
||||
$uploadedVideos = Video::getAllVideos($status, $user_id, !isToHidePrivateVideos(), array(), false, $showUnlisted, true, false, null, $type);
|
||||
$uploadedVideos = Video::getAllVideos($status, $user_id, !isToHidePrivateVideos(), [], false, $showUnlisted, true, false, null, $type);
|
||||
}
|
||||
TimeLogEnd($timeLog, __LINE__);
|
||||
$totalPages = ceil($uploadedTotalVideos / $rowCount);
|
||||
|
@ -309,7 +309,7 @@ if($advancedCustomUser->showChannelLiveTab){
|
|||
<?php
|
||||
$active = "fade";
|
||||
}
|
||||
|
||||
|
||||
if ($advancedCustomUser->showChannelHomeTab) {
|
||||
if (!empty($_GET['current'])) { // means you are paging the Videos tab
|
||||
$active = '';
|
||||
|
@ -442,7 +442,7 @@ if($advancedCustomUser->showChannelLiveTab){
|
|||
<?php
|
||||
$active = "fade";
|
||||
}
|
||||
|
||||
|
||||
if (!empty($uploadedTotalAudio)) {
|
||||
if (!empty($_GET['current'])) { // means you are paging the Videos tab
|
||||
$active = "";
|
||||
|
|
|
@ -42,7 +42,7 @@ if (empty($_GET['current'])) {
|
|||
}
|
||||
$_REQUEST['rowCount'] = 4;
|
||||
$sort = @$_POST['sort'];
|
||||
$_POST['sort'] = array();
|
||||
$_POST['sort'] = [];
|
||||
$_POST['sort']['created'] = 'DESC';
|
||||
$playlists = PlayList::getAllFromUser($user_id, $publicOnly, false, 0, 0, true);
|
||||
$_POST['sort'] = $sort;
|
||||
|
@ -204,7 +204,7 @@ unset($_POST['current']);
|
|||
$class = '';
|
||||
?>
|
||||
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo <?php echo $class; ?> " id="<?php echo $value['id']; ?>" style="padding: 1px;">
|
||||
<?php
|
||||
<?php
|
||||
echo Video::getVideoImagewithHoverAnimationFromVideosId($value);
|
||||
?>
|
||||
<a class="h6 galleryLink hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo getSEOTitle($value['title']); ?>">
|
||||
|
|
|
@ -55,10 +55,10 @@ if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
|||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
$byPassCaptcha = array(
|
||||
$byPassCaptcha = [
|
||||
'/Live.on_/',
|
||||
'/objects.aVideoEncoder/',
|
||||
);
|
||||
];
|
||||
|
||||
foreach($byPassCaptcha as $regExp){
|
||||
if(preg_match($regExp, $_SERVER['PHP_SELF'])){
|
||||
|
@ -67,7 +67,7 @@ foreach($byPassCaptcha as $regExp){
|
|||
}
|
||||
}
|
||||
|
||||
$ignoreLog = array('/view/xsendfile.php');
|
||||
$ignoreLog = ['/view/xsendfile.php'];
|
||||
if(!in_array($_SERVER['PHP_SELF'], $ignoreLog) || preg_match('/(bot|spider|crawl)/i', $_SERVER['HTTP_USER_AGENT'])){
|
||||
error_log("AVideo captcha {$ip} PHP_SELF={$_SERVER['PHP_SELF']} HTTP_USER_AGENT={$ua}");
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ if(!empty($_GET['captcha'])){
|
|||
<html>
|
||||
<head>
|
||||
<title>Captcha</title>
|
||||
<link href="view/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="view/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="node_modules/jquery/dist/jquery.min.js"></script>
|
||||
<script src="view/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<body class="">
|
||||
|
|
|
@ -31,7 +31,7 @@ $global['isForbidden'] = true;
|
|||
if (!empty($_REQUEST['unlockPassword'])) {
|
||||
$value = $_REQUEST['unlockPassword'];
|
||||
}
|
||||
echo getInputPassword('unlockPassword', 'class="form-control" value="' . $value . '"', __('Unlock Password'));
|
||||
echo getInputPassword('unlockPassword', 'class="form-control" value="' . $value . '"', __('Unlock Password'));
|
||||
?>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
|
|
|
@ -15,7 +15,7 @@ if (!empty($_GET['catName'])) {
|
|||
$photo = Category::getCategoryPhotoPath($categories_id);
|
||||
$background = Category::getCategoryBackgroundPath($categories_id);
|
||||
|
||||
$data = array('id'=>$categories_id);
|
||||
$data = ['id'=>$categories_id];
|
||||
|
||||
?>
|
||||
<div class="row" style="position: relative; z-index: 1; margin-top: -15px;">
|
||||
|
|
|
@ -78,12 +78,12 @@ $postURL = addQueryStringParameter($postURL, 'inMainIframe', 1);
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe
|
||||
frameborder="0"
|
||||
marginheight="0"
|
||||
marginwidth="0"
|
||||
width="100%"
|
||||
height="100%"
|
||||
<iframe
|
||||
frameborder="0"
|
||||
marginheight="0"
|
||||
marginwidth="0"
|
||||
width="100%"
|
||||
height="100%"
|
||||
scrolling="auto"
|
||||
src="<?php echo getURL('view\index_loading.html'); ?>" id="mainIframe" name="mainIframe"></iframe>
|
||||
<form action="<?php echo $postURL; ?>" method="post" target="mainIframe" style="display: none;" id="mainIframeForm">
|
||||
|
@ -345,7 +345,7 @@ $postURL = addQueryStringParameter($postURL, 'inMainIframe', 1);
|
|||
$('#mainIframe').attr('id', 'oldMainIframe');
|
||||
$(iframe).css({display:'none'});
|
||||
$('body').append(iframe);
|
||||
|
||||
|
||||
var oldMainIframe = $('#oldMainIframe');
|
||||
if(oldMainIframe.length){
|
||||
$(oldMainIframe).slideUp('fast', function () {
|
||||
|
@ -361,7 +361,7 @@ $postURL = addQueryStringParameter($postURL, 'inMainIframe', 1);
|
|||
$(document).ready(function () {
|
||||
$('#mainIframeForm').submit();
|
||||
//$("#window").draggable({handle: ".panel-heading", containment: "body"});
|
||||
//$("#window").resizable();
|
||||
//$("#window").resizable();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -63,6 +63,6 @@ if (empty($firstPage) || !empty($_GET['videoName']) || !empty($_GET['v']) || !em
|
|||
} else {
|
||||
require $firstPage;
|
||||
}
|
||||
*
|
||||
*
|
||||
*/
|
||||
include $global['systemRootPath'].'objects/include_end.php';
|
||||
|
|
|
@ -409,8 +409,8 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
$(t).find('i').removeClass('fa-minus');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function tooglePluginForceShow(t) {
|
||||
var id = $(t).attr('id');
|
||||
var selector = '#jsonElements .'+id;
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<?php
|
||||
$users_tabs = array();
|
||||
$users_tabs = [];
|
||||
|
||||
$users_tabs[] = array('selector' => 'grid', 'queryString' => '?status=a', 'icon' => 'fas fa-user', 'title' => 'Active Users', 'active' => 'active', 'userGroupID' => 0);
|
||||
$users_tabs[] = array('selector' => 'gridInactive', 'queryString' => '?status=i', 'icon' => 'fas fa-user-slash', 'title' => 'Inactive Users', 'active' => '', 'userGroupID' => 0);
|
||||
$users_tabs[] = array('selector' => 'gridAdmin', 'queryString' => '?isAdmin=1', 'icon' => 'fas fa-user-tie', 'title' => 'Admin Users', 'active' => '', 'userGroupID' => 0);
|
||||
$users_tabs[] = ['selector' => 'grid', 'queryString' => '?status=a', 'icon' => 'fas fa-user', 'title' => 'Active Users', 'active' => 'active', 'userGroupID' => 0];
|
||||
$users_tabs[] = ['selector' => 'gridInactive', 'queryString' => '?status=i', 'icon' => 'fas fa-user-slash', 'title' => 'Inactive Users', 'active' => '', 'userGroupID' => 0];
|
||||
$users_tabs[] = ['selector' => 'gridAdmin', 'queryString' => '?isAdmin=1', 'icon' => 'fas fa-user-tie', 'title' => 'Admin Users', 'active' => '', 'userGroupID' => 0];
|
||||
|
||||
if (empty($advancedCustomUser->disableCompanySignUp)) {
|
||||
$users_tabs[] = array('selector' => 'companyAdmin', 'queryString' => '?isCompany=1', 'icon' => 'fas fa-building', 'title' => 'Company Users', 'active' => '', 'userGroupID' => 0);
|
||||
$users_tabs[] = array('selector' => 'companyApAdmin', 'queryString' => '?isCompany=2', 'icon' => 'fas fa-building', 'title' => 'Company Waiting Approval', 'active' => '', 'userGroupID' => 0);
|
||||
$users_tabs[] = ['selector' => 'companyAdmin', 'queryString' => '?isCompany=1', 'icon' => 'fas fa-building', 'title' => 'Company Users', 'active' => '', 'userGroupID' => 0];
|
||||
$users_tabs[] = ['selector' => 'companyApAdmin', 'queryString' => '?isCompany=2', 'icon' => 'fas fa-building', 'title' => 'Company Waiting Approval', 'active' => '', 'userGroupID' => 0];
|
||||
}
|
||||
|
||||
foreach ($userGroups as $value) {
|
||||
$users_tabs[] = array('selector' => 'userGroupGrid' . $value['id'], 'queryString' => '?status=a&user_groups_id=' . $value['id'], 'icon' => 'fas fa-users', 'title' => $value['group_name'], 'active' => '', 'userGroupID' => $value['id']);
|
||||
$users_tabs[] = ['selector' => 'userGroupGrid' . $value['id'], 'queryString' => '?status=a&user_groups_id=' . $value['id'], 'icon' => 'fas fa-users', 'title' => $value['group_name'], 'active' => '', 'userGroupID' => $value['id']];
|
||||
}
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
|
@ -68,7 +68,7 @@ foreach ($userGroups as $value) {
|
|||
<li><a href="#" id="filter<?php echo $value['userGroupID']; ?>_permanent" onclick="userGroupFilter(<?php echo $value['userGroupID']; ?>, 'permanent');return false;;"><i class="fas fa-lock"></i> <?php echo __('Permanent User groups'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -29,7 +29,7 @@ echo $croppie1['html'];
|
|||
?>
|
||||
<hr>
|
||||
<button class="btn btn-success btn-lg btn-block" onclick="closeWindowAfterImageSave=true;<?php echo $croppie1['getCroppieFunction']; ?>"><i class="fas fa-save"></i> <?php echo __('Save'); ?></button>
|
||||
|
||||
|
||||
<script>
|
||||
var closeWindowAfterImageSave = false;
|
||||
function saveVideo(image) {
|
||||
|
|
|
@ -131,7 +131,7 @@ if (!empty($_GET['iframe'])) {
|
|||
if (User::canUpload()) {
|
||||
if (empty($advancedCustom->doNotShowEncoderButton)) {
|
||||
if (!empty($config->getEncoderURL())) {
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
<form id="formEncoderVideosM" method="post" action="<?php echo $config->getEncoderURL(); ?>" target="encoder">
|
||||
|
@ -146,7 +146,7 @@ if (!empty($_GET['iframe'])) {
|
|||
}
|
||||
if (CustomizeAdvanced::showDirectUploadButton()) {
|
||||
?>
|
||||
<button class="btn btn-sm btn-xs btn-default" onclick="newVideo();" id="uploadMp4" data-toggle="tooltip"
|
||||
<button class="btn btn-sm btn-xs btn-default" onclick="newVideo();" id="uploadMp4" data-toggle="tooltip"
|
||||
title="<?php echo __("Upload files without encode"), ' ', implode(', ', CustomizeAdvanced::directUploadFiletypes()); ?>" >
|
||||
<span class="fa fa-upload"></span>
|
||||
<span class="hidden-md hidden-sm hidden-xs"><?php echo empty($advancedCustom->uploadMP4ButtonLabel) ? __("Direct upload") : __($advancedCustom->uploadMP4ButtonLabel); ?></span>
|
||||
|
@ -1244,7 +1244,7 @@ echo AVideoPlugin::getManagerVideosReset();
|
|||
.attr("aria-valuenow", p100)
|
||||
.text("End: " + p100 + "%");
|
||||
}
|
||||
|
||||
|
||||
function viewsDetailsReset() {
|
||||
$("#videoViewFormModal .modal-title").html("Loading ... ");
|
||||
$("#progress25 .progress-bar")
|
||||
|
@ -2084,23 +2084,23 @@ if (!empty($_GET['link'])) {
|
|||
if (typeof response[x] !== 'object') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
var videoResponse = response[x];
|
||||
v_id = videoResponse.videos_id;
|
||||
playlists = videoResponse.playlists;
|
||||
|
||||
|
||||
console.log('playlistsFromUserVideos playlists', playlists);
|
||||
for (var y in playlists) {
|
||||
if (typeof playlists[y] !== 'object') {
|
||||
continue;
|
||||
}
|
||||
|
||||
lists += '<div class="material-small material-switch"><input onchange="saveVideoOnPlaylist(' + v_id + ', $(this).is(\':checked\'), '
|
||||
+ playlists[y].id + ')" data-toggle="toggle" type="checkbox" id="playlistVideo'
|
||||
+ v_id + "_" + playlists[y].id + '" value="1" '
|
||||
+ (playlists[y].isOnPlaylist ? "checked" : "") + ' videos_id="' + v_id + '" ><label for="playlistVideo'
|
||||
+ v_id + "_"
|
||||
+ playlists[y].id + '" class="label-primary"></label> '
|
||||
lists += '<div class="material-small material-switch"><input onchange="saveVideoOnPlaylist(' + v_id + ', $(this).is(\':checked\'), '
|
||||
+ playlists[y].id + ')" data-toggle="toggle" type="checkbox" id="playlistVideo'
|
||||
+ v_id + "_" + playlists[y].id + '" value="1" '
|
||||
+ (playlists[y].isOnPlaylist ? "checked" : "") + ' videos_id="' + v_id + '" ><label for="playlistVideo'
|
||||
+ v_id + "_"
|
||||
+ playlists[y].id + '" class="label-primary"></label> '
|
||||
+ playlists[y].name_translated + '</div>';
|
||||
}
|
||||
console.log('playlistsFromUserVideos videoPlaylist'+v_id, lists);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<button type="button" class="btn btn-success btn-block saveVideoBtn"><i class="far fa-save"></i> <?php echo __("Save"); ?></button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<button type="button" class="btn btn-danger btn-block" onclick="confirmDeleteVideo($('#inputVideoId').val());"><i class="fas fa-trash"></i>
|
||||
<button type="button" class="btn btn-danger btn-block" onclick="confirmDeleteVideo($('#inputVideoId').val());"><i class="fas fa-trash"></i>
|
||||
<span class="hidden-xs"><?php echo __("Delete"); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -254,7 +254,7 @@
|
|||
<?php
|
||||
$myAffiliates = CustomizeUser::getCompanyAffiliates(User::getId());
|
||||
if (!empty($myAffiliates)) {
|
||||
$users_id_list = array();
|
||||
$users_id_list = [];
|
||||
$users_id_list[] = User::getId();
|
||||
foreach ($myAffiliates as $value) {
|
||||
$users_id_list[] = $value['users_id_affiliate'];
|
||||
|
@ -267,7 +267,7 @@
|
|||
<div class="row" <?php if (empty($advancedCustomUser->userCanChangeVideoOwner) && !Permissions::canAdminVideos()) { ?> style="display: none;" <?php } ?>>
|
||||
<label class="control-label" for="inputUserOwner_id" ><?php echo __("Media Owner"); ?></label>
|
||||
<?php
|
||||
$updateUserAutocomplete = Layout::getUserAutocomplete(0, 'inputUserOwner_id', array());
|
||||
$updateUserAutocomplete = Layout::getUserAutocomplete(0, 'inputUserOwner_id', []);
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
@ -276,7 +276,7 @@
|
|||
<?php
|
||||
$myAffiliation = CustomizeUser::getAffiliateCompanies(User::getId());
|
||||
if (!empty($myAffiliation)) {
|
||||
$users_id_list = array();
|
||||
$users_id_list = [];
|
||||
foreach ($myAffiliation as $value) {
|
||||
$users_id_list[] = $value['users_id_company'];
|
||||
}
|
||||
|
@ -407,7 +407,7 @@
|
|||
<button type="button" class="btn btn-success btn-block saveVideoBtn"><i class="far fa-save"></i> <?php echo __("Save"); ?></button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<button type="button" class="btn btn-danger btn-block" onclick="confirmDeleteVideo($('#inputVideoId').val());"><i class="fas fa-trash"></i>
|
||||
<button type="button" class="btn btn-danger btn-block" onclick="confirmDeleteVideo($('#inputVideoId').val());"><i class="fas fa-trash"></i>
|
||||
<span class="hidden-xs"><?php echo __("Delete"); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@ if (useIframe() && !isIframe() && empty($_REQUEST['inMainIframe'])) {
|
|||
header('Location: '.$paths['url']);
|
||||
exit;
|
||||
}
|
||||
*
|
||||
*
|
||||
*/
|
||||
//var_dump(__LINE__, __FILE__);exit;
|
||||
if (!empty($_GET['evideo'])) {
|
||||
|
@ -73,20 +73,20 @@ if (!empty($evideo)) {
|
|||
}
|
||||
if (!empty($_GET['playlist_id'])) {
|
||||
$isSerie = 1;
|
||||
|
||||
|
||||
$plp = new PlayListPlayer(@$_GET['playlist_id'], @$_GET['playlists_tags_id']);
|
||||
|
||||
$playListData = $plp->getPlayListData();
|
||||
|
||||
|
||||
$video = $plp->getCurrentVideo();
|
||||
|
||||
|
||||
$_getVideos_id = intval($video['id']);
|
||||
$playlist_index = $plp->getIndex();
|
||||
|
||||
if (empty($playListData)) {
|
||||
videoNotFound('');
|
||||
}
|
||||
|
||||
|
||||
$videosPlayList = $plp->getVideos();
|
||||
$autoPlayVideo = $plp->getNextVideo();
|
||||
$playlist_id = $plp->getPlaylists_id();
|
||||
|
@ -170,7 +170,7 @@ if (!empty($evideo)) {
|
|||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
}
|
||||
|
||||
|
||||
$modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
if (!empty($video)) {
|
||||
|
@ -345,7 +345,7 @@ TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
|||
<br>
|
||||
<br>
|
||||
<div class="alert alert-warning">
|
||||
<span class="glyphicon glyphicon-facetime-video"></span>
|
||||
<span class="glyphicon glyphicon-facetime-video"></span>
|
||||
<strong><?php echo __("Attention"); ?>!</strong> <?php echo empty($advancedCustom->videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.
|
||||
</div>
|
||||
<?php }
|
||||
|
|
|
@ -121,7 +121,7 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
|
|||
<?php
|
||||
}
|
||||
$filesToDownload = [];
|
||||
$files = array();
|
||||
$files = [];
|
||||
$canDownloadFiles = CustomizeUser::canDownloadVideosFromVideo($video['id']);
|
||||
if ($video['type'] == "zip") {
|
||||
$files = getVideosURLZIP($video['filename']);
|
||||
|
@ -132,8 +132,8 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
|
|||
$files = getVideosURL($video['filename']);
|
||||
}
|
||||
if (!empty($files)) {
|
||||
$downloadMP3Link = array();
|
||||
$downloadMP4Link = array();
|
||||
$downloadMP3Link = [];
|
||||
$downloadMP4Link = [];
|
||||
foreach ($files as $key => $theLink) {
|
||||
//$notAllowedKeys = array('m3u8');
|
||||
$notAllowedKeys = ['log'];
|
||||
|
@ -260,7 +260,7 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
|
|||
}
|
||||
if (preg_match('/\.json/i', $theLink['url'])) {
|
||||
?>
|
||||
<button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>', '<?php echo $theLink['progress']; ?>');"
|
||||
<button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>', '<?php echo $theLink['progress']; ?>');"
|
||||
class="btn btn-default" target="_blank">
|
||||
<i class="fas fa-download"></i> <?php echo $theLink['name']; ?>
|
||||
</button>
|
||||
|
@ -312,8 +312,8 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
|
|||
|
||||
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Rating"); ?>:</strong></div>
|
||||
<div class="col-xs-8 col-sm-10 col-lg-10">
|
||||
<img src="<?php echo getURL('view/rrating/rating-' . $video['rrating'] . '.png'); ?>"
|
||||
class="img img-responsive zoom"
|
||||
<img src="<?php echo getURL('view/rrating/rating-' . $video['rrating'] . '.png'); ?>"
|
||||
class="img img-responsive zoom"
|
||||
style="width:30px;"/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ if ($config->getAuthCanViewChart() == 0) {
|
|||
}
|
||||
} elseif (User::isLogged()) {
|
||||
$users_id = User::getId();
|
||||
}
|
||||
}
|
||||
} elseif ($config->getAuthCanViewChart() == 1) {
|
||||
if ((!empty($_SESSION['user']['canViewChart']))||(User::isAdmin())) {
|
||||
if(empty($_REQUEST['users_id'])){
|
||||
|
@ -35,7 +35,7 @@ if ($config->getAuthCanViewChart() == 0) {
|
|||
$obj = new stdClass();
|
||||
|
||||
|
||||
$obj->data = array();
|
||||
$obj->data = [];
|
||||
|
||||
|
||||
if(empty($users_id)){
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
"footerCallback": function (row, data, start, end, display) {
|
||||
var api = this.api(), data;
|
||||
|
||||
// Update footer by showing the total with the reference of the column index
|
||||
// Update footer by showing the total with the reference of the column index
|
||||
var totalViewsAllVideos = 0;
|
||||
var totalWatchingTimeAllVideosHuman = '';
|
||||
if (data[0]) {
|
||||
|
|
|
@ -30,13 +30,13 @@ if (User::isLogged()) {
|
|||
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<?php
|
||||
<?php
|
||||
if(User::isLogged()){
|
||||
include $global['systemRootPath'] . 'view/userBody.php';
|
||||
include $global['systemRootPath'] . 'view/userBody.php';
|
||||
}else{
|
||||
include $global['systemRootPath'] . 'view/userLogin.php';
|
||||
include $global['systemRootPath'] . 'view/userLogin.php';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</div><!--/.container-->
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ if (!empty($advancedCustomUser->forceLoginToBeTheEmail)) {
|
|||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
$('#updateUserForm').submit(function (evt) {
|
||||
evt.preventDefault();
|
||||
if (!isAnalytics()) {
|
||||
|
|
|
@ -31,7 +31,7 @@ $factorW = $screenWidth / $finalWidth;
|
|||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||
?>
|
||||
<div class="container">
|
||||
<br>
|
||||
<br>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/userChannelArtUploadInclude.php';
|
||||
?>
|
||||
|
|
|
@ -26,13 +26,13 @@ $caUid = 'ChannelArt_' . uniqid();
|
|||
border-bottom: solid 1px #FF0000AA;
|
||||
}
|
||||
</style>
|
||||
<div class="form-group" id="<?php echo $caUid; ?>">
|
||||
<div class="form-group" id="<?php echo $caUid; ?>">
|
||||
<a href="<?php echo getURL('view/img/sampleGuide.png'); ?>" target="_blank" class="btn btn-default pull-right"><i class="fas fa-question-circle"></i> <?php echo __('Channel Art Help'); ?></a>
|
||||
<?php
|
||||
$croppie = getCroppie(__('Select new Channel Art'), 'channelArtUpload', $finalWidth, $finalHeight, $screenWidth, 0, $screenHeight, false);
|
||||
echo $croppie['html'];
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-success btn-block" type="button" onclick="<?php echo $croppie['getCroppieFunction']; ?>"><i class="fas fa-save"></i> <?php echo __('Save Channel Art'); ?></button>
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@ $finalHeight = 150;
|
|||
$screenWidth = 150;
|
||||
$caUid = 'Photo_' . uniqid();
|
||||
?>
|
||||
<div class="form-group" id="<?php echo $caUid; ?>">
|
||||
<div class="form-group" id="<?php echo $caUid; ?>">
|
||||
<?php
|
||||
$croppie = getCroppie(__('Profile Photo'), 'userPhotoUpload', $finalWidth, $finalHeight, $screenWidth);
|
||||
echo $croppie['html'];
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-success btn-block" type="button" onclick="<?php echo $croppie['getCroppieFunction']; ?>"><i class="fas fa-save"></i> <?php echo __('Save Profile Photo'); ?></button>
|
||||
<?php
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ getCSSAnimationClassAndStyleAddWait(0.5);
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="clearfix"></div>
|
||||
<div class="clearfix"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -84,15 +84,15 @@ if (User::canSeeCommentTextarea()) {
|
|||
#commentsArea .isAResponse{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
#commentsArea > .media .media .isAResponse{
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
#commentsArea > .media .media .media .isAResponse{
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="commentsArea" class="<?php echo $class; ?>"></div>
|
||||
<center>
|
||||
|
@ -201,10 +201,10 @@ if (User::canSeeCommentTextarea()) {
|
|||
}else{
|
||||
itemsArray.isAResponse = 'isNotAResponse';
|
||||
}
|
||||
|
||||
|
||||
itemsArray.videoLink = itemsArray.video.link;
|
||||
itemsArray.videoTitle = itemsArray.video.title;
|
||||
|
||||
|
||||
var template = getCommentTemplate(itemsArray);
|
||||
|
||||
var selector = '#commentsArea ';
|
||||
|
@ -224,7 +224,7 @@ if (User::canSeeCommentTextarea()) {
|
|||
}else{
|
||||
$(selector).prepend(template);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ if (User::canSeeCommentTextarea()) {
|
|||
if ($(selector).is(':empty')) {
|
||||
getComments(comments_id, 1);
|
||||
}
|
||||
|
||||
|
||||
if ($(t).hasClass('isOpen')) {
|
||||
$(t).removeClass('isOpen');
|
||||
$(t).addClass('isNotOpen');
|
||||
|
@ -271,7 +271,7 @@ if (User::canSeeCommentTextarea()) {
|
|||
if(page>1){
|
||||
avideoToastInfo('Finished');
|
||||
}
|
||||
$('#commentLoadMoreBtn').fadeOut();
|
||||
$('#commentLoadMoreBtn').fadeOut();
|
||||
}
|
||||
}
|
||||
if(page<=1){
|
||||
|
|
|
@ -5,22 +5,22 @@
|
|||
</div>
|
||||
<div class="media-body">
|
||||
<h3 class="media-heading hideIfHasVideosId">
|
||||
<a href="{videoLink}"><i class="fas fa-video"></i> {videoTitle}</a>
|
||||
<a href="{videoLink}"><i class="fas fa-video"></i> {videoTitle}</a>
|
||||
</h3>
|
||||
<h4 class="media-heading">
|
||||
<a href="{channelLink}"><i class="fas fa-user"></i> {identification}</a>
|
||||
<a href="{channelLink}"><i class="fas fa-user"></i> {identification}</a>
|
||||
<small><i>{humanTiming}</i></small>
|
||||
<i class="fas fa-thumbtack pull-right hideIfIsUnpinned" onclick="pinComment({id});" style="cursor: pointer;"></i>
|
||||
</h4>
|
||||
<p>{commentWithLinks}</p>
|
||||
<div class="btn-group pull-right commentsButtonsGroup">
|
||||
<button class="btn btn-default no-outline reply btn-xs hideIfCanNotComment" onclick="popupCommentTextarea({id}, '');"><i class="fas fa-reply"></i> {replyText}</button>
|
||||
<button onclick="saveCommentLikeDislike({id}, 1);"
|
||||
<button onclick="saveCommentLikeDislike({id}, 1);"
|
||||
class="faa-parent animated-hover btn btn-default no-outline btn-xs commentLikeDislikeBtn commentLikeBtn hideIfremoveThumbsUpAndDown hideIfUserNotLogged">
|
||||
<i class="fas fa-thumbs-up faa-bounce"></i>
|
||||
<small class="totalLikes{likes}">{likes}</small>
|
||||
</button>
|
||||
<button onclick="saveCommentLikeDislike({id}, -1);"
|
||||
<button onclick="saveCommentLikeDislike({id}, -1);"
|
||||
class="faa-parent animated-hover btn btn-default no-outline btn-xs commentLikeDislikeBtn commentDislikeBtn hideIfremoveThumbsUpAndDown hideIfUserNotLogged">
|
||||
<i class="fas fa-thumbs-down faa-bounce faa-reverse"></i>
|
||||
<small class="totalDislikes{dislikes}">{dislikes}</small>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<i class="fas fa-thumbs-up"></i>
|
||||
<small>{likes}</small>
|
||||
</button>
|
||||
<button onclick="saveCommentLikeDislike({id}, -1);"
|
||||
<button onclick="saveCommentLikeDislike({id}, -1);"
|
||||
class="btn btn-default no-outline btn-xs hideIfremoveThumbsUpAndDown hideIfUserLogged">
|
||||
<i class="fas fa-thumbs-down"></i>
|
||||
<small>{dislikes}</small>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</span>
|
||||
<span class="hideIfIsNotOpen">
|
||||
{hideRepliesText} <i class="fa fa-chevron-up" aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button class="btn btn-default no-outline pin btn-xs hideIfUserCanNotAdminComment hideIfIsResponse" onclick="pinComment({id});">
|
||||
<span class="hideIfIsPinned">
|
||||
|
|
|
@ -30,14 +30,14 @@ if (!User::canComment()) {
|
|||
if (User::isAdmin()) {
|
||||
?>
|
||||
<div class="col-xs-12">
|
||||
<label for="comment_users_id"><?php echo __('Select a user to comment as if you were him'); ?></label>
|
||||
<label for="comment_users_id"><?php echo __('Select a user to comment as if you were him'); ?></label>
|
||||
</div>
|
||||
<?php
|
||||
$users_autocomplete = Layout::getUserAutocomplete(0, 'comment_users_id');
|
||||
}
|
||||
?>
|
||||
<div class="col-xs-10 col-lg-9" style="padding-right: 1px;">
|
||||
<textarea class="form-control custom-control" rows="3" style="resize:none" id="comment"
|
||||
<textarea class="form-control custom-control" rows="3" style="resize:none" id="comment"
|
||||
<?php echo $disabled; ?>><?php
|
||||
echo $content;
|
||||
?></textarea>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{subscriptionButton}<br>
|
||||
<a href='{channelLink}' class="btn btn-link">
|
||||
{name}
|
||||
{icon}
|
||||
{icon}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -194,7 +194,7 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
<link href="<?php echo getURL('node_modules/jquery-toast-plugin/dist/jquery.toast.min.css'); ?>" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<link rel="image_src" href="<?php echo $img; ?>" />
|
||||
|
||||
|
||||
<script src="<?php echo getURL('node_modules/jquery/dist/jquery.min.js'); ?>" type="text/javascript"></script>
|
||||
<style>
|
||||
body {
|
||||
|
@ -435,7 +435,7 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
</script>
|
||||
<?php
|
||||
} elseif ($video['type'] == "linkVideo" || $video['type'] == "liveLink") {
|
||||
$t = array('id'=>$_GET['link']);
|
||||
$t = ['id'=>$_GET['link']];
|
||||
?>
|
||||
<!-- videoLink include liveVideo.php [<?php echo $_GET['link']; ?>] -->
|
||||
<?php
|
||||
|
|
|
@ -18,7 +18,7 @@ if ($config->getAuthCanViewChart() == 0) {
|
|||
}
|
||||
} elseif (User::isLogged()) {
|
||||
$users_id = User::getId();
|
||||
}
|
||||
}
|
||||
} elseif ($config->getAuthCanViewChart() == 1) {
|
||||
if ((!empty($_SESSION['user']['canViewChart']))||(User::isAdmin())) {
|
||||
if(empty($_REQUEST['users_id'])){
|
||||
|
@ -32,7 +32,7 @@ if ($config->getAuthCanViewChart() == 0) {
|
|||
$obj = new stdClass();
|
||||
|
||||
|
||||
$obj->data = array();
|
||||
$obj->data = [];
|
||||
|
||||
|
||||
if(empty($users_id)){
|
||||
|
@ -45,15 +45,15 @@ if($users_id === 'all'){
|
|||
|
||||
$obj->data = VideoStatistic::getStatisticTotalViewsAndSecondsWatchingFromUser($users_id, $from, $to);
|
||||
|
||||
$rows = array();
|
||||
$rows = [];
|
||||
foreach ($obj->data as $value) {
|
||||
$rows[] = array(
|
||||
$rows[] = [
|
||||
$value['videos_id'],
|
||||
$value['title'],
|
||||
$value['type'],
|
||||
$value['total_views'],
|
||||
intval($value['seconds_watching_video'])
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
$filename = "{$users_id}_{$fromDate}_{$toDate}";
|
||||
|
@ -63,7 +63,7 @@ $identification = 'All Users';
|
|||
if(!empty($users_id)){
|
||||
$identification = User::getNameIdentificationById($users_id);
|
||||
}
|
||||
fputcsv($output, array('From', $fromDate, 'To', $toDate, 'User', "[{$users_id}] {$identification}"));
|
||||
fputcsv($output, ['From', $fromDate, 'To', $toDate, 'User', "[{$users_id}] {$identification}"]);
|
||||
$fields = ['videos_id', 'title', 'type', 'total views', 'seconds watching video'];
|
||||
fputcsv($output, $fields);
|
||||
foreach ($rows as $row) {
|
||||
|
|
|
@ -11,18 +11,18 @@ if (isBot()) {
|
|||
|
||||
$videos_id = getVideos_id();
|
||||
|
||||
$sortOptions = array(
|
||||
array('key' => 'title', 'order' => 'asc', 'sortBy' => 'titleAZ', 'label' => __("Title (A-Z)"), 'data-icon' => '<i class="fas fa-sort-alpha-down"></i>'),
|
||||
array('key' => 'title', 'order' => 'desc', 'sortBy' => 'titleZA', 'label' => __("Title (Z-A)"), 'data-icon' => '<i class="fas fa-sort-alpha-down-alt"></i>'),
|
||||
array('key' => 'created', 'order' => 'desc', 'sortBy' => 'newest', 'label' => __("Date added (newest)"), 'data-icon' => '<i class="fas fa-sort-numeric-down"></i>'),
|
||||
array('key' => 'created', 'order' => 'asc', 'sortBy' => 'oldest', 'label' => __("Date added (oldest)"), 'data-icon' => '<i class="fas fa-sort-numeric-down"></i>'),
|
||||
array('key' => 'likes', 'order' => 'desc', 'sortBy' => 'popular', 'label' => __("Most popular"), 'data-icon' => '<i class="far fa-thumbs-up"></i>'),
|
||||
array('key' => 'suggested', 'order' => 'desc', 'sortBy' => 'suggested', 'label' => __("Suggested"), 'data-icon' => '<i class="fas fa-star"></i>'),
|
||||
array('key' => 'trending', 'order' => 'desc', 'sortBy' => 'trending', 'label' => __("Trending"), 'data-icon' => '<i class="fas fa-fire"></i>'),
|
||||
);
|
||||
$sortOptions = [
|
||||
['key' => 'title', 'order' => 'asc', 'sortBy' => 'titleAZ', 'label' => __("Title (A-Z)"), 'data-icon' => '<i class="fas fa-sort-alpha-down"></i>'],
|
||||
['key' => 'title', 'order' => 'desc', 'sortBy' => 'titleZA', 'label' => __("Title (Z-A)"), 'data-icon' => '<i class="fas fa-sort-alpha-down-alt"></i>'],
|
||||
['key' => 'created', 'order' => 'desc', 'sortBy' => 'newest', 'label' => __("Date added (newest)"), 'data-icon' => '<i class="fas fa-sort-numeric-down"></i>'],
|
||||
['key' => 'created', 'order' => 'asc', 'sortBy' => 'oldest', 'label' => __("Date added (oldest)"), 'data-icon' => '<i class="fas fa-sort-numeric-down"></i>'],
|
||||
['key' => 'likes', 'order' => 'desc', 'sortBy' => 'popular', 'label' => __("Most popular"), 'data-icon' => '<i class="far fa-thumbs-up"></i>'],
|
||||
['key' => 'suggested', 'order' => 'desc', 'sortBy' => 'suggested', 'label' => __("Suggested"), 'data-icon' => '<i class="fas fa-star"></i>'],
|
||||
['key' => 'trending', 'order' => 'desc', 'sortBy' => 'trending', 'label' => __("Trending"), 'data-icon' => '<i class="fas fa-fire"></i>'],
|
||||
];
|
||||
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
$sortOptions[] = array('key' => 'views_count', 'order' => 'desc', 'sortBy' => 'views_count', 'label' => __("Most watched"), 'data-icon' => '<i class="fas fa-eye"></i>');
|
||||
$sortOptions[] = ['key' => 'views_count', 'order' => 'desc', 'sortBy' => 'views_count', 'label' => __("Most watched"), 'data-icon' => '<i class="fas fa-eye"></i>'];
|
||||
}
|
||||
|
||||
$sortBy = $advancedCustom->sortVideoListByDefault->value;
|
||||
|
@ -43,7 +43,7 @@ if (empty($_REQUEST['rowCount']) && empty($_SESSION['rowCount'])) {
|
|||
$jsonRowCountArray = _json_decode($advancedCustom->videosListRowCount);
|
||||
|
||||
if(empty($jsonRowCountArray) || !is_array($jsonRowCountArray)){
|
||||
$jsonRowCountArray = array(10,20,30,40,50);
|
||||
$jsonRowCountArray = [10,20,30,40,50];
|
||||
}
|
||||
|
||||
if (!in_array($_SESSION['rowCount'], $jsonRowCountArray)) {
|
||||
|
@ -53,7 +53,7 @@ if (!in_array($_SESSION['rowCount'], $jsonRowCountArray)) {
|
|||
$_REQUEST['rowCount'] = $_SESSION['rowCount'];
|
||||
$_SESSION['sortBy'] = $sortBy;
|
||||
|
||||
$_POST['sort'] = array();
|
||||
$_POST['sort'] = [];
|
||||
foreach ($sortOptions as $value) {
|
||||
//var_dump($sortBy, strtolower($value['sortBy']), $sortBy === strtolower($value['sortBy']));echo '<hr>';
|
||||
if ($sortBy === strtolower($value['sortBy'])) {
|
||||
|
@ -94,10 +94,10 @@ $objGallery = AVideoPlugin::getObjectData("Gallery");
|
|||
?>
|
||||
<div class="col-md-8 col-sm-12 " style="position: relative; z-index: 10;" >
|
||||
<?php
|
||||
$optionsArray = array();
|
||||
$optionsArray = [];
|
||||
$selected = false;
|
||||
foreach ($sortOptions as $value) {
|
||||
$optionsArray[] = array(htmlentities("{$value['data-icon']} {$value['label']}"), $value['sortBy'], 'order="' . $value['order'] . '" key="' . $value['key'] . '"');
|
||||
$optionsArray[] = [htmlentities("{$value['data-icon']} {$value['label']}"), $value['sortBy'], 'order="' . $value['order'] . '" key="' . $value['key'] . '"'];
|
||||
//var_dump($sortBy, strtolower($value['sortBy']), $sortBy === strtolower($value['sortBy']));echo '<hr>';
|
||||
if ($sortBy === strtolower($value['sortBy'])) {
|
||||
$selected = $value['sortBy'];
|
||||
|
@ -157,11 +157,11 @@ $objGallery = AVideoPlugin::getObjectData("Gallery");
|
|||
<div class="details row">
|
||||
<div class="text-muted pull-right" style="display:flex;">
|
||||
<div class="label label-default alreadyTooltip" data-toggle="tooltip" title="" style="" data-original-title="Watching Now">
|
||||
<i class="fa fa-eye"></i>
|
||||
<i class="fa fa-eye"></i>
|
||||
<b class=""><i class="fas fa-circle-notch fa-spin"></i></b>
|
||||
</div>
|
||||
<div class="label label-default alreadyTooltip" data-toggle="tooltip" title="" data-original-title="Total Views">
|
||||
<i class="fa fa-user"></i>
|
||||
<i class="fa fa-user"></i>
|
||||
<b class=""><i class="fas fa-circle-notch fa-spin"></i></b>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue