mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Improve json_decode
This commit is contained in:
parent
1b836e8554
commit
2153147be4
73 changed files with 303 additions and 122 deletions
|
@ -404,7 +404,7 @@ abstract class ObjectYPT implements ObjectInterface {
|
|||
if (file_exists($cachefile) && (empty($lifetime) || time() - $lifetime <= filemtime($cachefile))) {
|
||||
//if(preg_match('/getStats/', $cachefile)){echo $cachefile,'<br>';}
|
||||
$c = @url_get_contents($cachefile);
|
||||
$json = json_decode($c);
|
||||
$json = _json_decode($c);
|
||||
|
||||
if(empty($json) && !is_object($json) && !is_array($json)){
|
||||
$json = $c;
|
||||
|
@ -555,7 +555,7 @@ abstract class ObjectYPT implements ObjectInterface {
|
|||
if (!empty($_SESSION['user']['sessionCache'][$name])) {
|
||||
if ((empty($lifetime) || time() - $lifetime <= $_SESSION['user']['sessionCache'][$name]['time'])) {
|
||||
$c = $_SESSION['user']['sessionCache'][$name]['value'];
|
||||
$json = json_decode($c);
|
||||
$json = _json_decode($c);
|
||||
if(is_string($json) && strtolower($json) === 'false'){
|
||||
$json = false;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
|
|||
|
||||
// gettig the mobile submited value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
unset($_POST["redirectUri"]);
|
||||
if(!empty($input) && empty($_POST)){
|
||||
foreach ($input as $key => $value) {
|
||||
|
|
|
@ -507,7 +507,7 @@ require_once \$global['systemRootPath'].'objects/include_config.php';
|
|||
if (substr($advancedCustom->encoderNetwork, -1) !== '/') {
|
||||
$advancedCustom->encoderNetwork .= "/";
|
||||
}
|
||||
$bestEncoder = json_decode(url_get_contents($advancedCustom->encoderNetwork . "view/getBestEncoder.php", "", 10));
|
||||
$bestEncoder = _json_decode(url_get_contents($advancedCustom->encoderNetwork . "view/getBestEncoder.php", "", 10));
|
||||
if (!empty($bestEncoder->siteURL)) {
|
||||
$this->encoderURL = $bestEncoder->siteURL;
|
||||
} else {
|
||||
|
|
|
@ -2252,8 +2252,8 @@ function thereIsAnyRemoteUpdate() {
|
|||
return $cache;
|
||||
}
|
||||
|
||||
//$version = json_decode(url_get_contents("https://tutorials.avideo.com/version"));
|
||||
$version = json_decode(url_get_contents("https://tutorialsavideo.b-cdn.net/version", "", 4));
|
||||
//$version = _json_decode(url_get_contents("https://tutorials.avideo.com/version"));
|
||||
$version = _json_decode(url_get_contents("https://tutorialsavideo.b-cdn.net/version", "", 4));
|
||||
if (empty($version)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -3926,7 +3926,7 @@ function isTokenValid($token, $salt = "") {
|
|||
|
||||
function verifyToken($token, $salt = "") {
|
||||
global $global;
|
||||
$obj = json_decode(decryptString($token));
|
||||
$obj = _json_decode(decryptString($token));
|
||||
if (empty($obj)) {
|
||||
_error_log("verifyToken invalid token");
|
||||
return false;
|
||||
|
@ -4939,6 +4939,16 @@ function _json_encode($object) {
|
|||
return $json;
|
||||
}
|
||||
|
||||
function _json_decode($object) {
|
||||
if (empty($object)) {
|
||||
return false;
|
||||
}
|
||||
if(!is_string($object)){
|
||||
return $object;
|
||||
}
|
||||
return json_decode($object);
|
||||
}
|
||||
|
||||
// this will make sure the strring will fits in the database field
|
||||
function _substr($string, $start, $length = null) {
|
||||
// make sure the name is not chunked in case of multibyte string
|
||||
|
@ -5999,7 +6009,7 @@ function isURL200($url, $forceRecheck = false) {
|
|||
if (empty($forceRecheck)) {
|
||||
$result = ObjectYPT::getCache($name, 30);
|
||||
if (!empty($result)) {
|
||||
$object = json_decode($result);
|
||||
$object = _json_decode($result);
|
||||
return $object->result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ $videosArrayId = $argv[4];
|
|||
$getStatistcs = $argv[5];
|
||||
$showUnlisted = $argv[6];
|
||||
$activeUsersOnly = $argv[7];
|
||||
$_GET = object_to_array(json_decode($argv[8]));
|
||||
$_POST = object_to_array(json_decode($argv[9]));
|
||||
$_GET = object_to_array(_json_decode($argv[8]));
|
||||
$_POST = object_to_array(_json_decode($argv[9]));
|
||||
$cacheFileName = $argv[10];
|
||||
$lockFile = $cacheFileName.".lock";
|
||||
if(file_exists($lockFile) && (time() - filemtime($lockFile) < 300)){ // 5 min limit
|
||||
|
|
|
@ -8,7 +8,7 @@ session_write_close();
|
|||
$status = $argv[1];
|
||||
$showOnlyLoggedUserVideos = boolval($argv[2]);
|
||||
$ignoreGroup = boolval($argv[3]);
|
||||
$videosArrayId = json_decode($argv[4]);
|
||||
$videosArrayId = _json_decode($argv[4]);
|
||||
$getStatistcs = boolval($argv[5]);
|
||||
$cacheFileName = $argv[6];
|
||||
$lockFile = $cacheFileName . '.lock';
|
||||
|
|
|
@ -14,7 +14,7 @@ TimeLogStart($timeLog);
|
|||
|
||||
// gettig the mobile submited value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, true); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, true); //convert JSON into array
|
||||
if (!empty($input)) {
|
||||
foreach ($input as $key => $value) {
|
||||
$_POST[$key] = $value;
|
||||
|
@ -292,7 +292,7 @@ if ($object->isLogged) {
|
|||
//_error_log("login.json.php get MobileManager");
|
||||
$p = AVideoPlugin::loadPluginIfEnabled("MobileManager");
|
||||
if (!empty($p)) {
|
||||
$object->streamer = json_decode(url_get_contents($global['webSiteRootURL'] . "objects/status.json.php"));
|
||||
$object->streamer = _json_decode(url_get_contents($global['webSiteRootURL'] . "objects/status.json.php"));
|
||||
$object->plugin = $p->getDataObject();
|
||||
$object->encoder = $config->getEncoderURL();
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
|
|||
|
||||
// Getting the mobile submitted value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, true); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, true); //convert JSON into array
|
||||
if (!empty($input) && empty($_POST)) {
|
||||
foreach ($input as $key => $value) {
|
||||
$_POST[$key]=$value;
|
||||
|
|
|
@ -718,7 +718,7 @@ class PlayList extends ObjectYPT {
|
|||
$url = "{$encoder}view/videosListEPG.php?date_default_timezone=" . urlencode(date_default_timezone_get());
|
||||
|
||||
$content = url_get_contents($url);
|
||||
return json_decode($content);
|
||||
return _json_decode($content);
|
||||
}
|
||||
|
||||
public function getShowOnTV() {
|
||||
|
|
|
@ -14,7 +14,7 @@ require_once 'comment.php';
|
|||
require_once 'subscribe.php';
|
||||
// gettig the mobile submited value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
if(!empty($input) && empty($_POST)){
|
||||
foreach ($input as $key => $value) {
|
||||
$_POST[$key]=$value;
|
||||
|
|
|
@ -200,7 +200,7 @@ class Plugin extends ObjectYPT {
|
|||
if ($comparePluginVersion) {
|
||||
$pluginsMarketplace = ObjectYPT::getSessionCache('getAvailablePlugins', 600); // 10 min cache
|
||||
if (empty($pluginsMarketplace)) {
|
||||
$pluginsMarketplace = json_decode(url_get_contents("https://tutorials.avideo.com/info?version=1", "", 2));
|
||||
$pluginsMarketplace = _json_decode(url_get_contents("https://tutorials.avideo.com/info?version=1", "", 2));
|
||||
if(!empty($pluginsMarketplace)){
|
||||
ObjectYPT::setSessionCache('getAvailablePlugins', $pluginsMarketplace);
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ class Plugin extends ObjectYPT {
|
|||
static function encryptIfNeed($object_data) {
|
||||
$isString = false;
|
||||
if (!is_object($object_data)) {
|
||||
$object_data = json_decode($object_data);
|
||||
$object_data = _json_decode($object_data);
|
||||
$isString = true;
|
||||
}
|
||||
if (!empty($object_data)) {
|
||||
|
@ -488,7 +488,7 @@ class Plugin extends ObjectYPT {
|
|||
static function decryptIfNeed($object_data) {
|
||||
$isString = false;
|
||||
if (!is_object($object_data)) {
|
||||
$object_data = json_decode($object_data);
|
||||
$object_data = _json_decode($object_data);
|
||||
$isString = true;
|
||||
}
|
||||
if (!empty($object_data)) {
|
||||
|
@ -512,7 +512,7 @@ class Plugin extends ObjectYPT {
|
|||
static function isEncrypted($object_data_element_value) {
|
||||
if (!empty($object_data_element_value)) {
|
||||
$object_data_element_value_json = decryptString($object_data_element_value);
|
||||
$object_data_element_value_json = json_decode($object_data_element_value_json);
|
||||
$object_data_element_value_json = _json_decode($object_data_element_value_json);
|
||||
if (!empty($object_data_element_value_json) && !empty($object_data_element_value_json->dateEncrypted)) {
|
||||
return $object_data_element_value_json->value;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ $obj->subscribe = "";
|
|||
|
||||
// gettig the mobile submited value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
unset($_POST["redirectUri"]);
|
||||
if(!empty($input) && empty($_POST)){
|
||||
foreach ($input as $key => $value) {
|
||||
|
|
|
@ -1631,7 +1631,7 @@ if (typeof gtag !== \"function\") {
|
|||
function isRecoverPassExpired($recoverPass) {
|
||||
$string = decryptString($recoverPass);
|
||||
if ($string) {
|
||||
$json = json_decode($string);
|
||||
$json = _json_decode($string);
|
||||
if (is_object($json)) {
|
||||
if (time() < $json->valid) {
|
||||
return false;
|
||||
|
@ -1981,7 +1981,7 @@ if (typeof gtag !== \"function\") {
|
|||
}
|
||||
|
||||
public static function decodeVerificationCode($code) {
|
||||
$obj = json_decode(base64_decode($code));
|
||||
$obj = _json_decode(base64_decode($code));
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
@ -2126,7 +2126,7 @@ if (typeof gtag !== \"function\") {
|
|||
|
||||
public static function loginFromRequest() {
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, true); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, true); //convert JSON into array
|
||||
if (is_array($input)) {
|
||||
foreach ($input as $key => $value) {
|
||||
if (empty($_REQUEST[$key])) {
|
||||
|
|
|
@ -20,7 +20,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
|
|||
|
||||
// Getting the mobile submitted value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, true); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, true); //convert JSON into array
|
||||
if (!empty($input)) {
|
||||
foreach ($input as $key => $value) {
|
||||
$_POST[$key] = $value;
|
||||
|
|
|
@ -854,7 +854,7 @@ if (!class_exists('Video')) {
|
|||
$video['tags'] = self::getTags($video['id']);
|
||||
}
|
||||
if (!empty($video['externalOptions'])) {
|
||||
$video['externalOptions'] = json_decode($video['externalOptions']);
|
||||
$video['externalOptions'] = _json_decode($video['externalOptions']);
|
||||
} else {
|
||||
$video['externalOptions'] = new stdClass();
|
||||
}
|
||||
|
@ -1353,7 +1353,7 @@ if (!class_exists('Video')) {
|
|||
unlink($cacheFileName . ".lock");
|
||||
return $total;
|
||||
}
|
||||
$return = json_decode(file_get_contents($cacheFileName));
|
||||
$return = _json_decode(file_get_contents($cacheFileName));
|
||||
if (time() - filemtime($cacheFileName) > cacheExpirationTime()) {
|
||||
// file older than 1 min
|
||||
$command = ("php '{$global['systemRootPath']}objects/getAllVideosAsync.php' '$status' '$showOnlyLoggedUserVideos' '$ignoreGroup' '" . json_encode($videosArrayId) . "' '$getStatistcs' '$showUnlisted' '$activeUsersOnly' '{$get}' '{$post}' '{$cacheFileName}'");
|
||||
|
@ -1612,7 +1612,7 @@ if (!class_exists('Video')) {
|
|||
unlink($cacheFileName . ".lock");
|
||||
return $total;
|
||||
}
|
||||
$return = json_decode(file_get_contents($cacheFileName));
|
||||
$return = _json_decode(file_get_contents($cacheFileName));
|
||||
if (time() - filemtime($cacheFileName) > cacheExpirationTime()) {
|
||||
// file older than 1 min
|
||||
$command = ("php '{$global['systemRootPath']}objects/getTotalVideosInfoAsync.php' "
|
||||
|
@ -2465,7 +2465,7 @@ if (!class_exists('Video')) {
|
|||
unlink($cacheFileName . ".lock");
|
||||
return $total;
|
||||
}
|
||||
$return = json_decode(file_get_contents($cacheFileName));
|
||||
$return = _json_decode(file_get_contents($cacheFileName));
|
||||
if (time() - filemtime($cacheFileName) > 300) {
|
||||
// file older than 1 min
|
||||
$command = ("php '{$global['systemRootPath']}objects/getTags.php' '$video_id' '$type' '{$cacheFileName}'");
|
||||
|
@ -3472,7 +3472,7 @@ if (!class_exists('Video')) {
|
|||
unlink($cacheFileName . ".lock");
|
||||
return $total;
|
||||
}
|
||||
$return = json_decode(file_get_contents($cacheFileName));
|
||||
$return = _json_decode(file_get_contents($cacheFileName));
|
||||
if (time() - filemtime($cacheFileName) > cacheExpirationTime()) {
|
||||
// file older than 1 min
|
||||
$command = ("php '{$global['systemRootPath']}objects/getImageFromFilenameAsync.php' '$filename' '$type' '{$cacheFileName}'");
|
||||
|
@ -3966,7 +3966,7 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
|
||||
public function setVideoStartSeconds($videoStartSeconds) {
|
||||
$externalOptions = json_decode($this->getExternalOptions());
|
||||
$externalOptions = _json_decode($this->getExternalOptions());
|
||||
AVideoPlugin::onVideoSetVideoStartSeconds($this->id, $this->videoStartSeconds, $videoStartSeconds);
|
||||
$externalOptions->videoStartSeconds = $videoStartSeconds;
|
||||
$this->setExternalOptions(json_encode($externalOptions));
|
||||
|
@ -4014,7 +4014,7 @@ if (!class_exists('Video')) {
|
|||
public static function decodeEvideo() {
|
||||
$evideo = false;
|
||||
if (!empty($_GET['evideo'])) {
|
||||
$evideo = json_decode(decryptString($_GET['evideo']));
|
||||
$evideo = _json_decode(decryptString($_GET['evideo']));
|
||||
}
|
||||
$video = array();
|
||||
if (!empty($evideo)) {
|
||||
|
|
|
@ -41,7 +41,7 @@ if (!empty($_POST['videoLink'])) {
|
|||
$extension = strtolower(@$path_parts["extension"]);
|
||||
if (empty($_POST['id']) && !(in_array($extension, $audioLinks) || in_array($extension, $videoLinks))) {
|
||||
$info = url_get_contents($config->getEncoderURL() . "getLinkInfo/" . base64_encode($_POST['videoLink']));
|
||||
$infoObj = json_decode($info);
|
||||
$infoObj = _json_decode($info);
|
||||
$filename = uniqid("_YPTuniqid_", true);
|
||||
$filename = $obj->setFilename($filename);
|
||||
$obj->setTitle($infoObj->title);
|
||||
|
|
|
@ -178,7 +178,7 @@ class VideoStatistic extends ObjectYPT
|
|||
file_put_contents($cacheFileName, json_encode($total));
|
||||
return $total;
|
||||
}
|
||||
$return = json_decode(file_get_contents($cacheFileName));
|
||||
$return = _json_decode(file_get_contents($cacheFileName));
|
||||
if (time() - filemtime($cacheFileName) > 60) {
|
||||
// file older than 1 min
|
||||
$command = ("php '{$global['systemRootPath']}objects/getTotalLastDaysAsync.php' '$video_id' '$numberOfDays' '$cacheFileName'");
|
||||
|
@ -223,7 +223,7 @@ class VideoStatistic extends ObjectYPT
|
|||
file_put_contents($cacheFileName, json_encode($total));
|
||||
return $total;
|
||||
}
|
||||
$return = json_decode(file_get_contents($cacheFileName));
|
||||
$return = _json_decode(file_get_contents($cacheFileName));
|
||||
if (time() - filemtime($cacheFileName) > 60) {
|
||||
// file older than 1 min
|
||||
$command = ("php '{$global['systemRootPath']}objects/getTotalTodayAsync.php' '$video_id' '$cacheFileName'");
|
||||
|
|
|
@ -151,7 +151,7 @@ class API extends PluginAbstract {
|
|||
global $global;
|
||||
$obj = $this->startResponseObject($parameters);
|
||||
if(!empty($_REQUEST['httpHeaders'])){
|
||||
$json = json_decode($_REQUEST['httpHeaders']);
|
||||
$json = _json_decode($_REQUEST['httpHeaders']);
|
||||
if(!empty($json)){
|
||||
$_REQUEST['httpHeaders'] = $json;
|
||||
}else{
|
||||
|
|
|
@ -21,7 +21,7 @@ if(empty($plugin)){
|
|||
|
||||
// gettig the mobile submited value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
if(empty($input)){
|
||||
$input = array();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ if(empty($plugin)){
|
|||
|
||||
// gettig the mobile submited value
|
||||
$inputJSON = url_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
$input = _json_decode($inputJSON, TRUE); //convert JSON into array
|
||||
if(empty($input)){
|
||||
$input = array();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ class BlockonomicsYPT extends PluginAbstract {
|
|||
$options = array('http' => array('method' => 'GET'));
|
||||
$context = stream_context_create($options);
|
||||
$contents = url_get_contents(self::getPRICE_URL(), $context, 0, true);
|
||||
$price = json_decode($contents);
|
||||
$price = _json_decode($contents);
|
||||
//Total Cart value in bits
|
||||
$bits = intval(1.0e8 * $total_cost / $price->price);
|
||||
|
||||
|
@ -110,7 +110,7 @@ class BlockonomicsYPT extends PluginAbstract {
|
|||
return false;
|
||||
}
|
||||
|
||||
$responseObj = json_decode($contents);
|
||||
$responseObj = _json_decode($contents);
|
||||
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ if (empty($objo) || ($objo->onlyAdminCanBulkEmbed && !User::isAdmin())) {
|
|||
$value[$key] = xss_esc($value2);
|
||||
}
|
||||
//$info = url_get_contents($config->getEncoderURL() . "getLinkInfo/" . base64_encode($value));
|
||||
//$infoObj = json_decode($info);
|
||||
//$infoObj = _json_decode($info);
|
||||
$filename = uniqid("_YPTuniqid_", true);
|
||||
$videos = new Video();
|
||||
$videos->setFilename($filename);
|
||||
|
|
54
plugin/CDN/CDN.php
Normal file
54
plugin/CDN/CDN.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
|
||||
class CDN extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$txt = "With our CDN we will provide you a highly-distributed platform of servers that helps minimize delays in loading web page content "
|
||||
. "by reducing the physical distance between the server and the user. This helps users around the world view the same high-quality "
|
||||
. "content without slow loading times";
|
||||
$help = "";
|
||||
return $txt . $help;
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return "CDN";
|
||||
}
|
||||
|
||||
public function getUUID() {
|
||||
return "CDN73225-3807-4167-ba81-0509dd280e06";
|
||||
}
|
||||
|
||||
public function getPluginVersion() {
|
||||
return "1.0";
|
||||
}
|
||||
|
||||
public function getEmptyDataObject() {
|
||||
global $global, $config;
|
||||
$obj = new stdClass();
|
||||
$obj->key = "";
|
||||
$obj->CDN = "";
|
||||
$obj->CDN_S3 = "";
|
||||
$obj->CDN_B2 = "";
|
||||
$obj->CDN_YPTStorage = "";
|
||||
$obj->CDN_Live = "";
|
||||
// this is a JSON with servers_id + URL
|
||||
$obj->CDN_LiveServers = "";
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function getPluginMenu() {
|
||||
global $global;
|
||||
$fileAPIName = $global['systemRootPath'] . 'plugin/CDN/pluginMenu.html';
|
||||
return file_get_contents($fileAPIName);
|
||||
}
|
||||
|
||||
}
|
1
plugin/CDN/pluginMenu.html
Normal file
1
plugin/CDN/pluginMenu.html
Normal file
|
@ -0,0 +1 @@
|
|||
<button class="btn btn-primary btn-sm btn-xs btn-block" onclick="avideoModalIframeLarge('http://192.168.1.4/youphptube.com/marketplace/CDN/iframe.php?webSiteRootURL='+webSiteRootURL)"><i class="fas fa-edit"></i> CDN</button>
|
106
plugin/CDN/status.json.php
Normal file
106
plugin/CDN/status.json.php
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/../../videos/configuration.php';
|
||||
session_write_close();
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$resp = new stdClass();
|
||||
$resp->error = true;
|
||||
$resp->msg = '';
|
||||
$obj = AVideoPlugin::getDataObjectIfEnabled('CDN');
|
||||
if (empty($obj)) {
|
||||
$resp->msg = 'CDN Plugin disabled';
|
||||
die(json_encode($resp));
|
||||
}
|
||||
|
||||
if (empty($_REQUEST['key'])) {
|
||||
$resp->msg = 'Key is empty';
|
||||
die(json_encode($resp));
|
||||
}
|
||||
|
||||
if (!empty($obj->key)) {
|
||||
//check the key
|
||||
if ($obj->key !== $_REQUEST['key']) {
|
||||
$resp->msg = 'Key Does not match';
|
||||
die(json_encode($resp));
|
||||
}
|
||||
}
|
||||
$obj->key = $_REQUEST['key'];
|
||||
foreach ($_REQUEST['par'] as $key => $value) {
|
||||
$obj->{$key} = $value;
|
||||
$resp->{$key} = $value;
|
||||
}
|
||||
|
||||
// Update S3 CDN
|
||||
$resp->CDN_S3 = '';
|
||||
$plugin = AVideoPlugin::getDataObjectIfEnabled('AWS_S3');
|
||||
if (!empty($plugin)) {
|
||||
$region = trim($plugin->region);
|
||||
$bucket_name = trim($plugin->bucket_name);
|
||||
$endpoint = trim($plugin->endpoint);
|
||||
if (!empty($endpoint)) {
|
||||
$resp->CDN_S3 = str_replace('https://', "https://{$bucket_name}.", $endpoint);
|
||||
} else if (!empty($plugin->region)) {
|
||||
$resp->CDN_S3 = "https://{$bucket_name}.s3-accesspoint.{$region}.amazonaws.com";
|
||||
}
|
||||
if (!empty($resp->CDN_S3)) {
|
||||
$resp->CDN_S3 = addLastSlash($resp->CDN_S3);
|
||||
}
|
||||
}
|
||||
|
||||
// Update B2 CDN
|
||||
$resp->CDN_B2 = '';
|
||||
$plugin = AVideoPlugin::getDataObjectIfEnabled('Blackblaze_B2');
|
||||
if (!empty($plugin)) {
|
||||
$b2 = new Blackblaze_B2();
|
||||
$resp->CDN_B2 = $b2->getEndpoint();
|
||||
if (!empty($resp->CDN_B2)) {
|
||||
$resp->CDN_B2 = addLastSlash($resp->CDN_B2);
|
||||
}
|
||||
}
|
||||
|
||||
// Update YPT Storage CDN
|
||||
$resp->CDN_YPTStorage = array();
|
||||
$plugin = AVideoPlugin::getDataObjectIfEnabled('YPTStorage');
|
||||
if (!empty($plugin)) {
|
||||
$rows = Sites::getAllActive();
|
||||
foreach ($rows as $value) {
|
||||
if (empty($value['url'])) {
|
||||
continue;
|
||||
}
|
||||
$resp->CDN_YPTStorage[] = array(
|
||||
'id'=>$value['id'],
|
||||
'url'=>addLastSlash($value['url'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Update Live CDN
|
||||
$resp->CDN_Live = '';
|
||||
$resp->CDN_LiveServers = array();
|
||||
$plugin = AVideoPlugin::getDataObjectIfEnabled('Live');
|
||||
if (!empty($plugin)) {
|
||||
if ($plugin->useLiveServers) {
|
||||
$rows = Live_servers::getAllActive();
|
||||
foreach ($rows as $value) {
|
||||
if (empty($value['playerServer'])) {
|
||||
continue;
|
||||
}
|
||||
$resp->CDN_LiveServers[] = array(
|
||||
'id'=>$value['id'],
|
||||
'url'=>addLastSlash($value['playerServer'])
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$resp->CDN_Live = addLastSlash($plugin->playerServer);
|
||||
}
|
||||
}
|
||||
|
||||
// Update Liveservers CDN
|
||||
$cdn = AVideoPlugin::loadPluginIfEnabled('CDN');
|
||||
$id = $cdn->setDataObject($obj);
|
||||
if (!empty($id)) {
|
||||
$resp->error = false;
|
||||
}
|
||||
|
||||
die(json_encode($resp));
|
|
@ -73,7 +73,7 @@ $log->add("Clone (1 of {$totalSteps}): Asking the Server the database and the fi
|
|||
$content = url_get_contents($url, "", 3600, true);
|
||||
_error_log("Clone: url_get_contents($url) respond: ($content)");
|
||||
//var_dump($url, $content);exit;
|
||||
$json = json_decode($content);
|
||||
$json = _json_decode($content);
|
||||
|
||||
if (empty($json)) {
|
||||
$resp->msg = "Clone Server Unknow ERROR";
|
||||
|
@ -180,7 +180,7 @@ $url = $url . "&deleteDump={$json->sqlFile}";
|
|||
$log->add("Clone (6 of {$totalSteps}): Notify Server to Delete Dump");
|
||||
$content2 = url_get_contents($url);
|
||||
//var_dump($url, $content);exit;
|
||||
$json2 = json_decode($content);
|
||||
$json2 = _json_decode($content);
|
||||
if (!empty($json2->error)) {
|
||||
$log->add("Clone: Dump NOT deleted");
|
||||
} else {
|
||||
|
|
|
@ -78,7 +78,7 @@ class CombineSites extends PluginAbstract {
|
|||
$result = ObjectYPT::getCache($cacheName,$obj->cacheTimeInSeconds);
|
||||
if(empty($result)){
|
||||
$result = url_get_contents($url);
|
||||
$result = json_decode($result);
|
||||
$result = _json_decode($result);
|
||||
ObjectYPT::setCache($cacheName, $result);
|
||||
}
|
||||
if(empty($result)){
|
||||
|
|
|
@ -73,6 +73,6 @@ if ($o->save()) {
|
|||
// request access to my site
|
||||
$url = "{$_REQUEST['site_url']}plugin/CombineSites/page/addSite.json.php?site_url=".urlencode($global['webSiteRootURL'])."&get_token={$token}&give_token={$_REQUEST['get_token']}";
|
||||
_error_log("CombineSites::addsite: requesting {$url} ");
|
||||
$obj->response = json_decode(url_get_contents($url));
|
||||
$obj->response = _json_decode(url_get_contents($url));
|
||||
}
|
||||
_dieAndLogObject($obj, "CombineSites::addsite: ");
|
||||
|
|
|
@ -41,7 +41,7 @@ $status = ($_REQUEST['status']==='a'?'a':'i');
|
|||
// check the site
|
||||
if($status==='a'){
|
||||
$urlInfo = $o->getSite_url().'plugin/API/status.json.php';
|
||||
$info = json_decode(url_get_contents($urlInfo));
|
||||
$info = _json_decode(url_get_contents($urlInfo));
|
||||
if(empty($info)){
|
||||
$obj->msg = "It is not a valid Streamer site";
|
||||
die(json_encode($obj));
|
||||
|
|
|
@ -149,7 +149,7 @@ class Users_extra_info extends ObjectYPT {
|
|||
|
||||
public static function getFromUser($users_id) {
|
||||
$u = new User($users_id);
|
||||
return object_to_array(json_decode($u->getExtra_info()));
|
||||
return object_to_array(_json_decode($u->getExtra_info()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -406,8 +406,8 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
|||
}
|
||||
@$timesG[__LINE__] += microtime(true) - $startG;
|
||||
$startG = microtime(true);
|
||||
getLdJson($value['id']);
|
||||
getItemprop($value['id']);
|
||||
//getLdJson($value['id']);
|
||||
//getItemprop($value['id']);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ if ($oIMDB->isReady) {
|
|||
_error_log("IMDB encoder URL {$encoderURL}");
|
||||
$json = url_get_contents($encoderURL);
|
||||
_error_log("IMDB encoder answer {$json}");
|
||||
$json = json_decode($json);
|
||||
$json = _json_decode($json);
|
||||
if (!empty($json->videos_id)) {
|
||||
$trailerVideo = new Video('', '', $json->videos_id);
|
||||
$trailerVideo->setStatus('u');
|
||||
|
|
|
@ -307,7 +307,7 @@ class Layout extends PluginAbstract {
|
|||
}
|
||||
|
||||
if(!empty($flags[$selected])){
|
||||
$selectedJson = json_decode($flags[$selected][0]);
|
||||
$selectedJson = _json_decode($flags[$selected][0]);
|
||||
$selectedJsonIcon = $selectedJson->icon;
|
||||
}else{
|
||||
$selectedJsonIcon = '';
|
||||
|
|
|
@ -610,7 +610,7 @@ class Live extends PluginAbstract {
|
|||
|
||||
if (!empty($result)) {
|
||||
_error_log("Live::getStatsObject[$live_servers_id] 3: return cached result $name [lifetime=" . (maxLifetime() + 60) . "]");
|
||||
return json_decode($result);
|
||||
return _json_decode($result);
|
||||
}
|
||||
_error_log("Live::getStatsObject[$live_servers_id] 4: cache not found");
|
||||
} else {
|
||||
|
@ -1062,7 +1062,7 @@ class Live extends PluginAbstract {
|
|||
$result = ObjectYPT::getCache($cacheName, maxLifetime() + 60, true);
|
||||
if (!empty($result)) {
|
||||
_error_log("Live::_getStats cached result 2 {$_REQUEST['name']} {$cacheName}");
|
||||
return json_decode($result);
|
||||
return _json_decode($result);
|
||||
}
|
||||
}
|
||||
session_write_close();
|
||||
|
@ -1078,7 +1078,7 @@ class Live extends PluginAbstract {
|
|||
$p = AVideoPlugin::loadPlugin("Live");
|
||||
$xml = $p->getStatsObject($live_servers_id, $force_recreate);
|
||||
$xml = json_encode($xml);
|
||||
$xml = json_decode($xml);
|
||||
$xml = _json_decode($xml);
|
||||
$stream = false;
|
||||
$lifeStream = array();
|
||||
|
||||
|
@ -1456,7 +1456,7 @@ class Live extends PluginAbstract {
|
|||
$cache = ObjectYPT::getCache($name, 60, true);
|
||||
}
|
||||
if (!empty($cache)) {
|
||||
$json = json_decode($cache);
|
||||
$json = __json_decode($cache);
|
||||
}
|
||||
|
||||
if (!empty($json) && is_object($json)) {
|
||||
|
@ -1768,7 +1768,7 @@ class Live extends PluginAbstract {
|
|||
);
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return json_decode($output);
|
||||
return _json_decode($output);
|
||||
} catch (Exception $exc) {
|
||||
_error_log("Live:restream " . $exc->getTraceAsString());
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ switch ($obj->command) {
|
|||
}
|
||||
|
||||
$obj->commandURL = Live::getDropURL($l->getKey(), $obj->live_servers_id);
|
||||
$obj->response = json_decode(url_get_contents($obj->commandURL));
|
||||
$obj->response = _json_decode(url_get_contents($obj->commandURL));
|
||||
|
||||
if (!empty($obj->response)) {
|
||||
if ($obj->response->error) {
|
||||
|
|
|
@ -21,7 +21,7 @@ if(empty($p)){
|
|||
}
|
||||
$xml = $p->getStatsObject();
|
||||
$xml = json_encode($xml);
|
||||
$xml = json_decode($xml);
|
||||
$xml = _json_decode($xml);
|
||||
|
||||
$stream = false;
|
||||
$lifeStream = array();
|
||||
|
|
|
@ -78,7 +78,7 @@ $arrContextOptions=array(
|
|||
$content = file_get_contents($verifyTokenURL, false, stream_context_create($arrContextOptions));
|
||||
|
||||
error_log("Control.json.php verification respond content {$content}");
|
||||
$json = json_decode($content);
|
||||
$json = _json_decode($content);
|
||||
|
||||
if (empty($json)) {
|
||||
$obj->msg = "Could not verify token";
|
||||
|
|
|
@ -59,7 +59,7 @@ if($whichffmpeg!==$ffmpegBinary){
|
|||
|
||||
$request = file_get_contents("php://input");
|
||||
error_log("Restreamer.json.php php://input {$request}");
|
||||
$robj = json_decode($request);
|
||||
$robj = _json_decode($request);
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->error = true;
|
||||
|
@ -98,7 +98,7 @@ $arrContextOptions=array(
|
|||
$content = file_get_contents($verifyTokenURL, false, stream_context_create($arrContextOptions));
|
||||
|
||||
error_log("Restreamer.json.php verification respond content {$content}");
|
||||
$json = json_decode($content);
|
||||
$json = _json_decode($content);
|
||||
|
||||
if (empty($json)) {
|
||||
$obj->msg = "Could not verify token";
|
||||
|
|
|
@ -278,7 +278,7 @@ Best regards,
|
|||
return false;
|
||||
}
|
||||
|
||||
$json = json_decode($decryptedCode);
|
||||
$json = _json_decode($decryptedCode);
|
||||
if (empty($json)) {
|
||||
_error_log("LoginControl::validateConfirmationCodeHash we could not decrypt json {$json}");
|
||||
return false;
|
||||
|
@ -557,6 +557,7 @@ Best regards,
|
|||
$pattersToWhitelist[] = '/WebSocket/i';
|
||||
$pattersToWhitelist[] = '/LoginControl\/pgp/i';
|
||||
$pattersToWhitelist[] = '/plugin\/API/';
|
||||
$pattersToWhitelist[] = '/plugin\/Live/on_';
|
||||
|
||||
foreach ($pattersToWhitelist as $value) {
|
||||
if(preg_match($value, $_SERVER["REQUEST_URI"])){
|
||||
|
|
|
@ -194,12 +194,12 @@ Passcode: {password}
|
|||
$json = new stdClass();
|
||||
$json->content = ObjectYPT::getCache($name, $cache);
|
||||
if (!empty($json->content) && !empty($json->time)) {
|
||||
$json = json_decode($json->content);
|
||||
$json = _json_decode($json->content);
|
||||
$json->msg = "From Cache";
|
||||
} else {
|
||||
$url = $meetServer . "api/checkMeet.json.php?webSiteRootURL=" . urlencode($global['webSiteRootURL']) . "&secret=" . $secret;
|
||||
$content = url_get_contents($url);
|
||||
$json = json_decode($content);
|
||||
$json = _json_decode($content);
|
||||
if (!empty($json)) {
|
||||
$json->time = time();
|
||||
$json->url = $url;
|
||||
|
|
|
@ -447,7 +447,7 @@ class PayPalYPT extends PluginAbstract {
|
|||
$patch1 = new Patch();
|
||||
$patch1->setOp('replace')
|
||||
->setPath('/')
|
||||
->setValue(json_decode('{"name": "' . $name . '"}'));
|
||||
->setValue(_json_decode('{"name": "' . $name . '"}'));
|
||||
|
||||
$paymentDefinitions = $createdPlan->getPaymentDefinitions();
|
||||
$paymentDefinition = $paymentDefinitions[0];
|
||||
|
@ -456,7 +456,7 @@ class PayPalYPT extends PluginAbstract {
|
|||
$patch2 = new Patch();
|
||||
$patch2->setOp('replace')
|
||||
->setPath('/payment-definitions/' . $paymentDefinitionId)
|
||||
->setValue(json_decode('{
|
||||
->setValue(_json_decode('{
|
||||
"amount": {
|
||||
"currency": "' . $currency . '",
|
||||
"value": "' . $total . '"
|
||||
|
|
|
@ -565,7 +565,7 @@ class PlayLists extends PluginAbstract {
|
|||
// return object_to_array($cache);
|
||||
//}
|
||||
|
||||
$json = json_decode($content);
|
||||
$json = _json_decode($content);
|
||||
if(!is_object($json)){
|
||||
return array();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ foreach ($playList as $key => $value) {
|
|||
foreach ($subPlayList as $value) {
|
||||
$sources = getVideosURL($value['filename']);
|
||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||
$externalOptions = json_decode($value['externalOptions']);
|
||||
$externalOptions = _json_decode($value['externalOptions']);
|
||||
|
||||
$src = new stdClass();
|
||||
$src->src = $images->thumbsJpg;
|
||||
|
@ -73,7 +73,7 @@ foreach ($playList as $key => $value) {
|
|||
} else {
|
||||
$sources = getVideosURL($value['filename']);
|
||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||
$externalOptions = json_decode($value['externalOptions']);
|
||||
$externalOptions = _json_decode($value['externalOptions']);
|
||||
|
||||
$src = new stdClass();
|
||||
$src->src = $images->thumbsJpg;
|
||||
|
|
|
@ -72,7 +72,7 @@ $encoder = $config->_getEncoderURL();
|
|||
$obj->encoder = $encoder;
|
||||
|
||||
|
||||
$status = json_decode(url_get_contents($encoder."status"));
|
||||
$status = _json_decode(url_get_contents($encoder."status"));
|
||||
if(empty($status->version) || version_compare($status->version, "3.2") < 0){
|
||||
$obj->msg = __("Your Encoder MUST be version 3.2 or greater");
|
||||
_error_log("playProgramsLive:: {$obj->msg}");
|
||||
|
|
|
@ -37,7 +37,7 @@ foreach ($playList as $key => $value) {
|
|||
$sources = getVideosURL($value['filename']);
|
||||
}
|
||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||
$externalOptions = json_decode($value['externalOptions']);
|
||||
$externalOptions = _json_decode($value['externalOptions']);
|
||||
|
||||
$src = new stdClass();
|
||||
$src->src = $images->thumbsJpg;
|
||||
|
|
|
@ -25,7 +25,7 @@ foreach ($playList as $value) {
|
|||
$sources = getVideosURL($value['filename']);
|
||||
}
|
||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||
$externalOptions = json_decode($value['externalOptions']);
|
||||
$externalOptions = _json_decode($value['externalOptions']);
|
||||
|
||||
$src = new stdClass();
|
||||
$src->src = $images->thumbsJpg;
|
||||
|
|
|
@ -102,12 +102,12 @@ abstract class PluginAbstract {
|
|||
//echo $obj['object_data'];
|
||||
$o = array();
|
||||
if (!empty($obj['object_data'])) {
|
||||
$o = json_decode(stripslashes($obj['object_data']));
|
||||
$o = _json_decode(stripslashes($obj['object_data']));
|
||||
$json_last_error = json_last_error();
|
||||
if ($json_last_error !== JSON_ERROR_NONE) {
|
||||
//var_dump($this->getName(), $json_last_error, $o, $obj['object_data']);
|
||||
//_error_log('getDataObject - JSON error (' . $json_last_error . ') ' . $this->getName()." ".$this->getUUID());
|
||||
$o = json_decode($obj['object_data']);
|
||||
$o = _json_decode($obj['object_data']);
|
||||
$json_last_error = json_last_error();
|
||||
}
|
||||
switch ($json_last_error) {
|
||||
|
|
|
@ -20,7 +20,7 @@ $obj->error = true;
|
|||
$api = $razorpay->start();
|
||||
|
||||
$json = file_get_contents('php://input');
|
||||
$webhookBody = json_decode($json);
|
||||
$webhookBody = _json_decode($json);
|
||||
|
||||
//_error_log("RazorPayIPN header - " . json_encode($_SERVER));
|
||||
_error_log("RazorPayIPN Body - {$json}");
|
||||
|
|
|
@ -57,7 +57,7 @@ class Request
|
|||
|
||||
$this->checkErrors($response);
|
||||
|
||||
return json_decode($response->body, true);
|
||||
return _json_decode($response->body, true);
|
||||
}
|
||||
|
||||
public function setCurlSslOpts($curl)
|
||||
|
@ -96,7 +96,7 @@ class Request
|
|||
|
||||
try
|
||||
{
|
||||
$body = json_decode($response->body, true);
|
||||
$body = _json_decode($response->body, true);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ class SlackBot extends PluginAbstract
|
|||
curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
|
||||
$result = curl_exec($c);
|
||||
$userSlackInformation = json_decode($result);
|
||||
$userSlackInformation = _json_decode($result);
|
||||
if ($userSlackInformation->ok == true) {
|
||||
$slackChannel = $userSlackInformation->user->id;
|
||||
} else {
|
||||
|
|
|
@ -7,7 +7,7 @@ $returnStatus = null;
|
|||
|
||||
if (!$autoload) {
|
||||
// Modify composer to not autoload Stripe
|
||||
$composer = \json_decode(\file_get_contents('composer.json'), true);
|
||||
$composer = \_json_decode(\file_get_contents('composer.json'), true);
|
||||
unset($composer['autoload'], $composer['autoload-dev']);
|
||||
|
||||
\file_put_contents('composer.json', \json_encode($composer, \JSON_PRETTY_PRINT));
|
||||
|
|
|
@ -25,7 +25,7 @@ $payload = @file_get_contents('php://input');
|
|||
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
|
||||
$event = null;
|
||||
|
||||
$payloadObj = json_decode($payload);
|
||||
$payloadObj = _json_decode($payload);
|
||||
//_error_log("StripeIPN: WEBHOOK: ".json_encode($webhook));
|
||||
//_error_log("StripeIPN: payload ".json_encode($payloadObj));
|
||||
//_error_log("StripeIPN: sig_header ".json_encode($sig_header));
|
||||
|
|
|
@ -28,7 +28,7 @@ abstract class Webhook
|
|||
{
|
||||
WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance);
|
||||
|
||||
$data = \json_decode($payload, true);
|
||||
$data = \_json_decode($payload, true);
|
||||
$jsonError = \json_last_error();
|
||||
if (null === $data && \JSON_ERROR_NONE !== $jsonError) {
|
||||
$msg = "Invalid payload: {$payload} "
|
||||
|
|
|
@ -111,7 +111,7 @@ class IP2Location extends ObjectYPT {
|
|||
$content = file_get_contents($cachefile);
|
||||
}
|
||||
|
||||
return json_decode($content);
|
||||
return _json_decode($content);
|
||||
}
|
||||
|
||||
static function getRegions($country_name) {
|
||||
|
@ -146,7 +146,7 @@ class IP2Location extends ObjectYPT {
|
|||
$content = file_get_contents($cachefile);
|
||||
}
|
||||
|
||||
return json_decode($content);
|
||||
return _json_decode($content);
|
||||
}
|
||||
|
||||
static function getCities($country_name, $region_name) {
|
||||
|
@ -182,7 +182,7 @@ class IP2Location extends ObjectYPT {
|
|||
$content = file_get_contents($cachefile);
|
||||
}
|
||||
|
||||
return json_decode($content);
|
||||
return _json_decode($content);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ class Vimeo
|
|||
|
||||
$response = $this->_request($curl_url, $curl_opts);
|
||||
|
||||
$response['body'] = json_decode($response['body'], true);
|
||||
$response['body'] = _json_decode($response['body'], true);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ class Message implements MessageComponentInterface {
|
|||
$SocketGetTotals = null;
|
||||
$onMessageSentTo = array();
|
||||
//_log_message("onMessage: {$msg}");
|
||||
$json = json_decode($msg);
|
||||
$json = _json_decode($msg);
|
||||
if (empty($json)) {
|
||||
_log_message("onMessage ERROR: JSON is empty ");
|
||||
return false;
|
||||
|
@ -444,7 +444,7 @@ class Message implements MessageComponentInterface {
|
|||
return array();
|
||||
}
|
||||
if (is_string($msg)) {
|
||||
$decoded = json_decode($msg);
|
||||
$decoded = _json_decode($msg);
|
||||
} else {
|
||||
$decoded = object_to_array($msg);
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class YPTSocket extends PluginAbstract {
|
|||
|
||||
$SocketSendObj = new stdClass();
|
||||
$SocketSendObj->msg = $msg;
|
||||
$SocketSendObj->json = json_decode($msg);
|
||||
$SocketSendObj->json = _json_decode($msg);
|
||||
|
||||
$SocketSendObj->webSocketToken = getEncryptedInfo(0,$send_to_uri_pattern);
|
||||
$SocketSendObj->callback = $callbackJSFunction;
|
||||
|
|
|
@ -29,7 +29,7 @@ function getEncryptedInfo($timeOut = 0, $send_to_uri_pattern = "") {
|
|||
}
|
||||
if (empty($msgObj->live_key)) {
|
||||
if (!empty($_REQUEST['webSocketLiveKey'])) {
|
||||
$msgObj->live_key = json_decode($_REQUEST['webSocketLiveKey']);
|
||||
$msgObj->live_key = _json_decode($_REQUEST['webSocketLiveKey']);
|
||||
} else {
|
||||
$msgObj->live_key = isLive();
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ function getEncryptedInfo($timeOut = 0, $send_to_uri_pattern = "") {
|
|||
|
||||
function getDecryptedInfo($string) {
|
||||
$decriptedString = decryptString($string);
|
||||
$json = json_decode($decriptedString);
|
||||
$json = _json_decode($decriptedString);
|
||||
if (!empty($json) && !empty($json->token)) {
|
||||
if (isTokenValid($json->token)) {
|
||||
return $json;
|
||||
|
|
|
@ -58,7 +58,7 @@ function _test_send($SocketURL, $msg) {
|
|||
global $SocketSendObj;
|
||||
$conn->on('message', function($msg) use ($conn, $_count) {
|
||||
global $responses;
|
||||
$json = json_decode($msg->getPayload());
|
||||
$json = _json_decode($msg->getPayload());
|
||||
//var_dump($json);
|
||||
$parts = explode(':', $json->msg->test_msg);
|
||||
$c = new AVideoSocketConfiguration($parts[0], $parts[2], $parts[1], true);
|
||||
|
|
|
@ -23,7 +23,7 @@ use Razorpay\Api\Errors\SignatureVerificationError;
|
|||
|
||||
$success = true;
|
||||
$json = file_get_contents('php://input');
|
||||
$body = json_decode($json);
|
||||
$body = _json_decode($json);
|
||||
|
||||
if (!empty($json) && empty($body)) {
|
||||
parse_str($json, $body);
|
||||
|
|
|
@ -61,7 +61,7 @@ $displayAmount = $amount = $orderData['amount'];
|
|||
|
||||
if ($displayCurrency !== 'INR') {
|
||||
$url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR";
|
||||
$exchange = json_decode(file_get_contents($url), true);
|
||||
$exchange = _json_decode(file_get_contents($url), true);
|
||||
|
||||
$displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ $obj = $plugin->getDataObject();
|
|||
if (!empty($paypal)) {
|
||||
$paypalObj = $paypal->getDataObject();
|
||||
}
|
||||
$options = json_decode($obj->addFundsOptions);
|
||||
$options = _json_decode($obj->addFundsOptions);
|
||||
unset($_SESSION['addFunds_Success']);
|
||||
unset($_SESSION['addFunds_Fail']);
|
||||
?>
|
||||
|
|
|
@ -20,7 +20,7 @@ if(empty($plugin)){
|
|||
|
||||
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
|
||||
$dataObj = $plugin->getDataObject();
|
||||
$options = json_decode($dataObj->addFundsOptions);
|
||||
$options = _json_decode($dataObj->addFundsOptions);
|
||||
|
||||
//send an email
|
||||
$emailsArray = array();
|
||||
|
|
|
@ -9,7 +9,7 @@ if (!User::isLogged()) {
|
|||
|
||||
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
|
||||
$obj = $plugin->getDataObject();
|
||||
$options = json_decode($obj->addFundsOptions);
|
||||
$options = _json_decode($obj->addFundsOptions);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||
|
|
|
@ -9,7 +9,7 @@ if (!User::isLogged()) {
|
|||
|
||||
$plugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
|
||||
$obj = $plugin->getDataObject();
|
||||
$options = json_decode($obj->withdrawFundsOptions);
|
||||
$options = _json_decode($obj->withdrawFundsOptions);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||
|
|
|
@ -165,9 +165,9 @@ class YouTubeAPI extends PluginAbstract {
|
|||
}
|
||||
}
|
||||
} catch (Google_Service_Exception $e) {
|
||||
$object->msg = json_decode($e->getMessage());
|
||||
$object->msg = _json_decode($e->getMessage());
|
||||
} catch (Google_Exception $e) {
|
||||
$object->msg = json_decode($e->getMessage());
|
||||
$object->msg = _json_decode($e->getMessage());
|
||||
}
|
||||
if($try<10){
|
||||
_error_log("YouTubeAPI Error: ".json_encode($object));
|
||||
|
|
|
@ -1004,12 +1004,14 @@ li.dropdown-submenu > ul > li > a{
|
|||
height: calc(100% - 150px);
|
||||
}
|
||||
.swal-modal.swal-modal-iframe .swal-content,
|
||||
.swal-modal.swal-modal-iframe-small .swal-content{
|
||||
width: calc(100%);
|
||||
.swal-modal.swal-modal-iframe-small .swal-content,
|
||||
.swal-modal.swal-modal-iframe-large .swal-content{
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
.swal-modal.swal-modal-iframe iframe,
|
||||
.swal-modal.swal-modal-iframe-small iframe{
|
||||
.swal-modal.swal-modal-iframe-small iframe,
|
||||
.swal-modal.swal-modal-iframe-large iframe{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -1021,6 +1023,17 @@ li.dropdown-submenu > ul > li > a{
|
|||
max-height: 100%;
|
||||
}
|
||||
|
||||
.swal-modal-iframe-large {
|
||||
width: calc(100% - 50px);
|
||||
height: calc(100% - 50px);
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.swal-modal.swal-modal-iframe-large .swal-content{
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.getChangeVideoStatusButton button{
|
||||
display: none;
|
||||
|
|
|
@ -5,7 +5,7 @@ $cachedFile = '../videos/cache/version.cache';
|
|||
|
||||
if(file_exists($cachedFile)){
|
||||
$content = file_get_contents($cachedFile);
|
||||
$json = json_decode($content);
|
||||
$json = _json_decode($content);
|
||||
if(!empty($json)){
|
||||
$json->cache = filectime($cachedFile);
|
||||
echo json_encode($json);
|
||||
|
|
|
@ -1002,22 +1002,18 @@ function avideoAlertHTMLText(title, msg, type) {
|
|||
}
|
||||
|
||||
function avideoModalIframe(url) {
|
||||
var span = document.createElement("span");
|
||||
url = addGetParam(url, 'avideoIframe', 1);
|
||||
span.innerHTML = '<iframe src="' + url + '" />';
|
||||
swal({
|
||||
content: span,
|
||||
closeModal: true,
|
||||
buttons: false,
|
||||
className: 'swal-modal-iframe',
|
||||
onClose: avideoModalIframeRemove
|
||||
});
|
||||
setTimeout(function () {
|
||||
avideoModalIframeRemove();
|
||||
}, 1000);
|
||||
avideoModalIframeWithClassName(url, 'swal-modal-iframe');
|
||||
}
|
||||
|
||||
function avideoModalIframeSmall(url) {
|
||||
avideoModalIframeWithClassName(url, 'swal-modal-iframe-small');
|
||||
}
|
||||
|
||||
function avideoModalIframeLarge(url) {
|
||||
avideoModalIframeWithClassName(url, 'swal-modal-iframe-large');
|
||||
}
|
||||
|
||||
function avideoModalIframeWithClassName(url, className) {
|
||||
var span = document.createElement("span");
|
||||
url = addGetParam(url, 'avideoIframe', 1);
|
||||
span.innerHTML = '<iframe src="' + url + '" />';
|
||||
|
@ -1025,7 +1021,7 @@ function avideoModalIframeSmall(url) {
|
|||
content: span,
|
||||
closeModal: true,
|
||||
buttons: false,
|
||||
className: 'swal-modal-iframe-small',
|
||||
className: className,
|
||||
onClose: avideoModalIframeRemove
|
||||
});
|
||||
setTimeout(function () {
|
||||
|
|
|
@ -7,7 +7,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
|
|||
|
||||
//$json_file = url_get_contents("{$global['webSiteRootURL']}plugin/CustomizeAdvanced/advancedCustom.json.php");
|
||||
// convert the string to a json object
|
||||
//$advancedCustom = json_decode($json_file);
|
||||
//$advancedCustom = _json_decode($json_file);
|
||||
if (!empty($advancedCustomUser->disableNativeSignUp)) {
|
||||
die(__("Sign Up Disabled"));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ foreach ($tags as $value) {
|
|||
}
|
||||
//$json_file = url_get_contents("{$global['webSiteRootURL']}plugin/CustomizeAdvanced/advancedCustom.json.php");
|
||||
// convert the string to a json object
|
||||
//$advancedCustom = json_decode($json_file);
|
||||
//$advancedCustom = _json_decode($json_file);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||
|
|
|
@ -112,9 +112,9 @@ if (empty($_COOKIE) && get_browser_name() !== 'Other (Unknown)') {
|
|||
<label for="inputRememberMe" ><?php echo __("Remember me"); ?></label>
|
||||
</div>
|
||||
<div class="col-xs-8" >
|
||||
<div class="material-switch" >
|
||||
<div class="material-switch" data-toggle="tooltip" title="<?php echo __("Check this to stay signed in"); ?>">
|
||||
<input id="inputRememberMe" class="form-control" type="checkbox">
|
||||
<label for="inputRememberMe" class="label-success" data-toggle="tooltip" title="<?php echo __("Check this to stay signed in"); ?>"></label>
|
||||
<label for="inputRememberMe" class="label-success" ></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -102,7 +102,7 @@ if (empty($video['id'])) {
|
|||
<div class="col-md-4 col-sm-12" style="position: relative; z-index: 2;">
|
||||
<select class="form-control" id="rowCount">
|
||||
<?php
|
||||
$jsonArray = json_decode($advancedCustom->videosListRowCount);
|
||||
$jsonArray = _json_decode($advancedCustom->videosListRowCount);
|
||||
foreach ($jsonArray as $item) {
|
||||
if ($item == -1) {
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue