From 3842e8b2428bb47cafb205797af6b6ba11b2016a Mon Sep 17 00:00:00 2001 From: DanieL Date: Sat, 19 Nov 2022 17:45:17 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo/issues/7394 --- feed/roku.json.php | 2 +- install/liveLinks.php | 1 - locale/function.php | 4 +- objects/categories.json.php | 99 +++++------ objects/category.php | 9 +- objects/comment.php | 9 +- objects/commentAddNew.json.php | 2 +- objects/functions.php | 163 ++++++++++++------ objects/playlist.php | 4 +- objects/subscribe.php | 4 +- objects/user.php | 2 +- objects/video.php | 12 +- plugin/Live/Live.php | 7 +- plugin/Live/Objects/LiveTransmition.php | 2 - .../Live/Objects/LiveTransmitionHistory.php | 5 +- plugin/Live/Objects/Live_schedule.php | 21 +-- plugin/Live/Objects/Live_servers.php | 5 +- plugin/PlayLists/View/getPlaylistButtons.php | 18 +- plugin/Scheduler/Scheduler.php | 2 +- view/channelBody.php | 10 +- 20 files changed, 221 insertions(+), 160 deletions(-) diff --git a/feed/roku.json.php b/feed/roku.json.php index 0280757c7f..678f465f15 100644 --- a/feed/roku.json.php +++ b/feed/roku.json.php @@ -124,7 +124,7 @@ if (empty($output)) { $obj->playlists = [['name' => $playlistName, 'itemIds'=>$itemIds]]; $obj->categories = [['name' => $categoryName, 'playlistName' => $playlistName, 'order' => 'most_recent']]; - $output = _json_encode($obj, JSON_UNESCAPED_UNICODE); + $output = _json_encode($obj); if (empty($output) && json_last_error()) { $output = json_encode(json_last_error_msg()); var_dump($obj); diff --git a/install/liveLinks.php b/install/liveLinks.php index cb93fc34d4..2e7efe9c86 100644 --- a/install/liveLinks.php +++ b/install/liveLinks.php @@ -8,7 +8,6 @@ if (!isCommandLineInterface()) { AVideoPlugin::loadPlugin("Live"); -$channelName = ($channelName); $sql = "SELECT lt.*, u.* FROM users u LEFT JOIN live_transmitions lt ON users_id = u.id " . " WHERE canStream = 1 AND status = 'a' ORDER BY public DESC LIMIT 20"; $res = sqlDAL::readSql($sql); diff --git a/locale/function.php b/locale/function.php index 7bbb057925..6f12f99644 100644 --- a/locale/function.php +++ b/locale/function.php @@ -70,8 +70,8 @@ function getAllFlags() { /** * Deprecated replaced by Layout::getAvilableFlags() - * @global type $global - * @return type + * @global array $global + * @return array */ function getEnabledLangs() { global $global; diff --git a/objects/categories.json.php b/objects/categories.json.php index 7b09a19e40..3c9676b579 100644 --- a/objects/categories.json.php +++ b/objects/categories.json.php @@ -1,49 +1,50 @@ -', '
', '
'); -foreach ($categories as $key => $value) { - $categories[$key]['iconHtml'] = ""; - $categories[$key]['users_groups_ids_array'] = Categories_has_users_groups::getUserGroupsIdsFromCategory($value['id']); - - if(empty($categories[$key]['users_groups_ids_array'])){ - $categories[$key]['total_users_groups'] = 0; - }else{ - $categories[$key]['total_users_groups'] = count($categories[$key]['users_groups_ids_array']); - } - //$categories[$key]['description'] = str_ireplace($breaks, "\r\n", $value['description']); - /* - $sql = "SELECT * FROM `category_type_cache` WHERE categoryId = ?"; - $res = sqlDAL::readSql($sql,"i",array($value['id'])); - $catTypeCache = sqlDAL::fetchAssoc($res); - sqlDAL::close($res); - if($catTypeCache!=false){ - if($catTypeCache['manualSet']=="0"){ - $categories[$key]['type'] = "3"; - } else { - $categories[$key]['type'] = $catTypeCache['type']; - } - } else { - $categories[$key]['type'] = "3"; - } - * - */ -} -if (empty($_POST['sort']) && empty($_GET['sort'])) { - array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $categories); -} -echo '{ "current": '.getCurrentPage().',"rowCount": '.getRowCount().', "total": '.$total.', "rows":'. _json_encode($categories).'}'; +', '
', '
'); +foreach ($categories as $key => $value) { + $categories[$key]['iconHtml'] = ""; + $categories[$key]['users_groups_ids_array'] = Categories_has_users_groups::getUserGroupsIdsFromCategory($value['id']); + + if(empty($categories[$key]['users_groups_ids_array'])){ + $categories[$key]['total_users_groups'] = 0; + }else{ + $categories[$key]['total_users_groups'] = count($categories[$key]['users_groups_ids_array']); + } + //$categories[$key]['description'] = str_ireplace($breaks, "\r\n", $value['description']); + /* + $sql = "SELECT * FROM `category_type_cache` WHERE categoryId = ?"; + $res = sqlDAL::readSql($sql,"i",array($value['id'])); + $catTypeCache = sqlDAL::fetchAssoc($res); + sqlDAL::close($res); + if($catTypeCache!=false){ + if($catTypeCache['manualSet']=="0"){ + $categories[$key]['type'] = "3"; + } else { + $categories[$key]['type'] = $catTypeCache['type']; + } + } else { + $categories[$key]['type'] = "3"; + } + * + */ +} +if (empty($_POST['sort']) && empty($_GET['sort'])) { + $array_column = array_column($categories, 'hierarchyAndName'); + array_multisort($array_column, SORT_ASC, $categories); +} +echo '{ "current": '.getCurrentPage().',"rowCount": '.getRowCount().', "total": '.$total.', "rows":'. _json_encode($categories).'}'; diff --git a/objects/category.php b/objects/category.php index 0277c0255c..5985e83db3 100644 --- a/objects/category.php +++ b/objects/category.php @@ -181,7 +181,14 @@ class Category { return false; } } - + /** + * + * @param string $clean_title + * @param int $count + * @param int $id + * @param string $original_title + * @return string + */ public static function fixCleanTitle($clean_title, $count, $id, $original_title = "") { global $global; diff --git a/objects/comment.php b/objects/comment.php index c1946bafa0..30535a3633 100644 --- a/objects/comment.php +++ b/objects/comment.php @@ -79,7 +79,6 @@ class Comment { forbiddenPage('Permission denied'); } //$this->comment = htmlentities($this->comment); - $this->comment = ($this->comment); if (empty($this->comment)) { return false; @@ -112,6 +111,10 @@ class Comment { . " (?, ?, ?, {$this->comments_id_pai}, now(), now())"; $resp = sqlDAL::writeSql($sql, "sii", [xss_esc($this->comment), $users_id, $this->videos_id]); } + /** + * @var array $global + * @var object $global['mysqli'] + */ if ((empty($resp)) && ($global['mysqli']->errno != 0)) { die('Error (comment save) : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } @@ -224,6 +227,10 @@ class Comment { } //$comment = $res->fetch_all(MYSQLI_ASSOC); } else { + /** + * @var array $global + * @var object $global['mysqli'] + */ $comment = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } diff --git a/objects/commentAddNew.json.php b/objects/commentAddNew.json.php index f6afcc3f4b..6bc886eea6 100644 --- a/objects/commentAddNew.json.php +++ b/objects/commentAddNew.json.php @@ -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); //convert JSON into array unset($_REQUEST["redirectUri"]); if (!empty($input) && empty($_REQUEST)) { foreach ($input as $key => $value) { diff --git a/objects/functions.php b/objects/functions.php index ff1a8c0526..4a9bc5d55d 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -6,7 +6,7 @@ $AVideoStreamer_UA = "AVideoStreamer"; $AVideoStorage_UA = "AVideoStorage"; $mysql_connect_was_closed = 1; -if(!isset($global) || !is_array($global)){ +if (!isset($global) || !is_array($global)) { $global = array(); } @@ -517,13 +517,13 @@ function secondsToDuration($seconds) { /** * - * @global type $global + * @global array $global * @param string $mail * call it before send mail to let AVideo decide the method */ function setSiteSendMessage(\PHPMailer\PHPMailer\PHPMailer &$mail) { global $global; - if(empty($mail)){ + if (empty($mail)) { $mail = new \PHPMailer\PHPMailer\PHPMailer(); } if (empty($_POST["comment"])) { @@ -737,7 +737,7 @@ function sendEmailToSiteOwner($subject, $message) { if (!$resp) { _error_log("sendEmailToSiteOwner Error Info: {$mail->ErrorInfo}"); } else { - _error_log("sendEmailToSiteOwner Success Info: $subject " ); + _error_log("sendEmailToSiteOwner Success Info: $subject "); } return $resp; } catch (Exception $e) { @@ -1588,7 +1588,7 @@ function getSources($fileName, $returnArray = false, $try = 0) { /** * * @param string $file_src - * @return stringget image size with cache + * @return array get image size with cache */ function getimgsize($file_src) { global $_getimagesize; @@ -1939,19 +1939,48 @@ function im_resizeV3($file_src, $file_dest, $wd, $hd) { exec($ffmpeg . " < /dev/null 2>&1", $output, $return_val); } -if(false){ - class Imagick{ +if (false) { + + class Imagick { + const FILTER_BOX = 1; - function getImageFormat(){return '';} - function coalesceImages(){return new Imagick();} - function nextImage(){return true;} - function resizeImage(){} - function deconstructImages(){return new Imagick();} - function clear(){} - function destroy(){} - function writeImages(){} + + function getImageFormat() { + return ''; + } + + function coalesceImages() { + return new Imagick(); + } + + function nextImage() { + return true; + } + + function resizeImage() { + + } + + function deconstructImages() { + return new Imagick(); + } + + function clear() { + + } + + function destroy() { + + } + + function writeImages() { + + } + } + } + function im_resize_gif($file_src, $file_dest, $max_width, $max_height) { if (class_exists('Imagick')) { $imagick = new Imagick($file_src); @@ -3246,7 +3275,7 @@ function removeQueryStringParameter($url, $varname) { * @return string */ function addQueryStringParameter($url, $varname, $value) { - if($value === null || $value === ''){ + if ($value === null || $value === '') { return removeQueryStringParameter($url, $varname); } @@ -3501,7 +3530,7 @@ function siteMap() { $global['rowCount'] = $_REQUEST['rowCount'] = $advancedCustom->siteMapRowsLimit * 10; $_POST['sort']['created'] = "DESC"; $rows = Video::getAllVideosLight(!empty($advancedCustom->showPrivateVideosOnSitemap) ? "viewableNotUnlisted" : "publicOnly"); - if(empty($rows) || !is_array($rows)){ + if (empty($rows) || !is_array($rows)) { $rows = array(); } _error_log("siteMap: getAllVideos " . count($rows)); @@ -4391,15 +4420,15 @@ function _mysql_connect($persistent = false) { function _mysql_commit() { global $global; if (_mysql_is_open()) { - try{ + try { /** * * @var array $global * @var object $global['mysqli'] */ @$global['mysqli']->commit(); - }catch(Exception $exc){ - + } catch (Exception $exc) { + } //$global['mysqli'] = false; } @@ -4410,15 +4439,15 @@ function _mysql_close() { if (_mysql_is_open()) { //_error_log('MySQL Closed '. json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS))); $mysql_connect_was_closed = 1; - try{ + try { /** * * @var array $global * @var object $global['mysqli'] */ @$global['mysqli']->close(); - }catch(Exception $exc){ - + } catch (Exception $exc) { + } //$global['mysqli'] = false; } @@ -6082,7 +6111,7 @@ function examineJSONError($object) { function _json_encode_utf8($object) { $object = object_to_array($object); - if(!is_array($object)){ + if (!is_array($object)) { return false; } $objectEncoded = $object; @@ -6103,25 +6132,25 @@ function _json_encode($object) { if (is_string($object)) { return $object; } - - if(!empty($_json_encode_force_utf8)){ + + if (!empty($_json_encode_force_utf8)) { $json = _json_encode_utf8($object); - if(!empty($json)){ + if (!empty($json)) { return $json; } } - + $json = json_encode($object); $errors = array(); if (empty($json) && json_last_error()) { - if(preg_match('/Malformed UTF-8 characters/i', json_last_error_msg())){ + if (preg_match('/Malformed UTF-8 characters/i', json_last_error_msg())) { $json = _json_encode_utf8($object); - if(!empty($json)){ + if (!empty($json)) { $_json_encode_force_utf8 = 1; return $json; } } - + $errors[] = "_json_encode: Error 1 Found: " . json_last_error_msg(); //_error_log("_json_encode: Error 1 Found: " . json_last_error_msg()); $object = object_to_array($object); @@ -6135,13 +6164,13 @@ function _json_encode($object) { $json = _json_encode_utf8($object); if (empty($json) && json_last_error()) { $errors[] = "_json_encode: Error 4 Found: " . json_last_error_msg(); - }else{ + } else { $_json_encode_force_utf8 = 1; } } } } - if(empty($json) && !empty($errors)){ + if (empty($json) && !empty($errors)) { foreach ($errors as $value) { _error_log($value); } @@ -6639,7 +6668,7 @@ function _unsetcookie($cookieName) { /** * This function is not 100% but try to tell if the site is in an iFrame - * @global type $global + * @global array $global * @return boolean */ function isIframeInDifferentDomain() { @@ -6943,7 +6972,7 @@ function getServerClock() { /** * Xsendfile and FFMPEG are required for this feature - * @global type $global + * @global array $global * @param string $filepath * @return boolean */ @@ -7836,7 +7865,7 @@ function getLiveVideosFromCategory($categories_id) { foreach ($stats["applications"] as $key => $value) { if (empty($value['categories_id']) || $categories_id != $value['categories_id']) { continue; - } + } $videos[] = getLiveVideosObject($value); } } @@ -8347,16 +8376,18 @@ function fixPath($path, $addLastSlash = false) { return $path; } -if(false){ - function openssl_cipher_key_length(){ +if (false) { + + function openssl_cipher_key_length() { return 0; } + } -function getHashMethodsAndInfo(){ +function getHashMethodsAndInfo() { global $global, $_getHashMethod; - - if(empty($_getHashMethod)){ + + if (empty($_getHashMethod)) { if (empty($global['salt'])) { $global['salt'] = '11234567890abcdef'; } @@ -8369,23 +8400,22 @@ function getHashMethodsAndInfo(){ $cipher_algo = 'rc4'; } $cipher_methods = openssl_get_cipher_methods(); - if(!in_array($cipher_algo, $cipher_methods)){ + if (!in_array($cipher_algo, $cipher_methods)) { $base = 32; $cipher_algo = $cipher_methods[0]; } - $ivlen = openssl_cipher_iv_length($cipher_algo); - if(function_exists('openssl_cipher_key_length')){ + $ivlen = openssl_cipher_iv_length($cipher_algo); + if (function_exists('openssl_cipher_key_length')) { $keylen = openssl_cipher_key_length($cipher_algo); - }else{ + } else { $keylen = $ivlen; } $iv = substr($saltMD5, 0, $ivlen); $key = substr($saltMD5, 0, $keylen); - $_getHashMethod = array('cipher_algo'=>$cipher_algo, 'iv'=>$iv, 'key'=>$key, 'base'=>$base); - + $_getHashMethod = array('cipher_algo' => $cipher_algo, 'iv' => $iv, 'key' => $key, 'base' => $base); } return $_getHashMethod; } @@ -8400,13 +8430,13 @@ function idToHash($id) { if (!empty($_idToHash[$id])) { return $_idToHash[$id]; } - + $MethodsAndInfo = getHashMethodsAndInfo(); $cipher_algo = $MethodsAndInfo['cipher_algo']; $iv = $MethodsAndInfo['iv']; $key = $MethodsAndInfo['key']; $base = $MethodsAndInfo['base']; - + if (empty($global['salt'])) { $global['salt'] = '11234567890abcdef'; } @@ -8415,9 +8445,9 @@ function idToHash($id) { //$hash = preg_replace('/^([+]+)/', '', $hash); $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))); - if(!empty($global['useLongHash'])){ + 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))); + if (!empty($global['useLongHash'])) { $global['useLongHash'] = 0; return idToHash($id); } @@ -8430,13 +8460,13 @@ function idToHash($id) { function hashToID($hash) { global $global; $hash = str_replace(['_', '-', '.'], ['/', '+', '='], $hash); - + $MethodsAndInfo = getHashMethodsAndInfo(); $cipher_algo = $MethodsAndInfo['cipher_algo']; $iv = $MethodsAndInfo['iv']; $key = $MethodsAndInfo['key']; $base = $MethodsAndInfo['base']; - + //$hash = base64_decode($hash); $decrypt = @openssl_decrypt($hash, $cipher_algo, $key, 0, $iv); $decrypt = base_convert($decrypt, $base, 10); @@ -8463,7 +8493,7 @@ function videosHashToID($hash_of_videos_id) { /** * * @global type $advancedCustom - * @global type $global + * @global array $global * @global type $_getCDNURL * @param string $type enum(CDN, CDN_S3,CDN_B2,CDN_FTP,CDN_YPTStorage,CDN_Live,CDN_LiveServers) * @param string $id the ID of the URL in case the CDN is an array @@ -9382,7 +9412,7 @@ function is_email($strOrArray) { /** * https://codepen.io/ainalem/pen/LJYRxz - * @global type $global + * @global array $global * @param string $id * @param string $type 1 to 8 [1=x, 2=<-, 3=close, 4=x, 5=<-, 6=x, 7=x, 8=x] * @param string $parameters @@ -9753,3 +9783,24 @@ function getIframePaths() { return array('relative' => $relativeSRC, 'url' => $url, 'path' => "{$global['systemRootPath']}{$relativeSRC}", 'modeYoutube' => $modeYoutube); } + +function getFeedButton($rss, $mrss, $roku) { + $buttons = ''; + return $buttons; +} diff --git a/objects/playlist.php b/objects/playlist.php index 13241121fe..6935238e76 100644 --- a/objects/playlist.php +++ b/objects/playlist.php @@ -94,7 +94,7 @@ class PlayList extends ObjectYPT { /** * - * @global type $global + * @global array $global * @param string $publicOnly * @param string $userId if not present check session * @param string $isVideoIdPresent pass the ID of the video checking @@ -211,7 +211,7 @@ class PlayList extends ObjectYPT { /** * - * @global type $global + * @global array $global * @param string $publicOnly * @param string $userId if not present check session * @param string $isVideoIdPresent pass the ID of the video checking diff --git a/objects/subscribe.php b/objects/subscribe.php index 3e6474f5a8..549f642780 100644 --- a/objects/subscribe.php +++ b/objects/subscribe.php @@ -161,7 +161,7 @@ class Subscribe extends ObjectYPT{ /** * return all subscribers that has subscribe to an user channel - * @global type $global + * @global array $global * @param string $user_id * @return array */ @@ -229,7 +229,7 @@ class Subscribe extends ObjectYPT{ /** * return all channels that a user has subscribed - * @global type $global + * @global array $global * @param string $user_id * @return boolean */ diff --git a/objects/user.php b/objects/user.php index cd02539643..bc7ad37d36 100644 --- a/objects/user.php +++ b/objects/user.php @@ -1416,7 +1416,7 @@ if (typeof gtag !== \"function\") { /** * this is the deprecated function, with week password - * @global type $global + * @global array $global * @param string $user * @param string $pass * @param string $mustBeactive diff --git a/objects/video.php b/objects/video.php index 0942014941..209ff1fbe9 100644 --- a/objects/video.php +++ b/objects/video.php @@ -1191,7 +1191,7 @@ if (!class_exists('Video')) { /** * - * @global type $global + * @global array $global * @param string $status * @param string $showOnlyLoggedUserVideos you may pass an user ID to filter results * @param string $ignoreGroup @@ -1702,10 +1702,10 @@ if (!class_exists('Video')) { /** * Same as getAllVideos() method but a lighter query - * @global type $global + * @global array $global * @global type $config * @param string $showOnlyLoggedUserVideos - * @return boolean + * @return array */ public static function getAllVideosLight($status = "viewable", $showOnlyLoggedUserVideos = false, $showUnlisted = false, $suggestedOnly = false) { global $global, $config; @@ -2942,7 +2942,7 @@ if (!class_exists('Video')) { /** * - * @global type $global + * @global array $global * @param string $videos_id * @param string $users_id if is empty will use the logged user * @return boolean @@ -2973,7 +2973,7 @@ if (!class_exists('Video')) { /** * - * @global type $global + * @global array $global * @param string $videos_id * @param string $users_id if is empty will use the logged user * @return boolean @@ -4378,7 +4378,7 @@ if (!class_exists('Video')) { /** * - * @global type $global + * @global array $global * @param string $videos_id * @param string $clean_title * @param string $embed diff --git a/plugin/Live/Live.php b/plugin/Live/Live.php index 835d56c8e3..21b115143a 100644 --- a/plugin/Live/Live.php +++ b/plugin/Live/Live.php @@ -1294,7 +1294,9 @@ Click here to join our live."; public static function getPlayerServer($ignoreCDN = false) { $obj = AVideoPlugin::getObjectData("Live"); - + /** + * @var string $url + */ $url = $obj->playerServer; if (empty($ignoreCDN)) { $url = getCDNOrURL($url, 'CDN_Live'); @@ -3726,6 +3728,9 @@ Click here to join our live."; $ls = new Live_schedule($live_schedule_id); $users_id = Live_schedule::getUsers_idOrCompany($live_schedule_id); $title = $ls->getTitle(); + /** + * @var string $date_start + */ $date_start = $ls->getScheduled_time(); $date_end = ''; $joinURL = Live::getLinkToLiveFromUsers_id($users_id, $live_schedule_id); diff --git a/plugin/Live/Objects/LiveTransmition.php b/plugin/Live/Objects/LiveTransmition.php index b0bbb11234..c886d11f9d 100644 --- a/plugin/Live/Objects/LiveTransmition.php +++ b/plugin/Live/Objects/LiveTransmition.php @@ -208,7 +208,6 @@ class LiveTransmition extends ObjectYPT { global $global; _mysql_connect(); - $userName = ($userName); $sql = "SELECT * FROM users WHERE user = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", [$userName], true); $data = sqlDAL::fetchAssoc($res); @@ -228,7 +227,6 @@ class LiveTransmition extends ObjectYPT { global $global; _mysql_connect(); - $channelName = ($channelName); $sql = "SELECT * FROM users WHERE channelName = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", [$channelName], true); $data = sqlDAL::fetchAssoc($res); diff --git a/plugin/Live/Objects/LiveTransmitionHistory.php b/plugin/Live/Objects/LiveTransmitionHistory.php index 417fecff7a..f900193b59 100644 --- a/plugin/Live/Objects/LiveTransmitionHistory.php +++ b/plugin/Live/Objects/LiveTransmitionHistory.php @@ -99,13 +99,11 @@ class LiveTransmitionHistory extends ObjectYPT { global $global; $Char = "‌"; $title = str_replace($Char, '', $title); - $title = ($title); $this->title = $title; } public function setDescription($description) { global $global; - $description = ($description); $this->description = $description; } @@ -163,7 +161,7 @@ class LiveTransmitionHistory extends ObjectYPT { /** * * @param int $liveTransmitionHistory_id - * @return object + * @return array */ public static function getApplicationObject($liveTransmitionHistory_id) { global $global; @@ -392,7 +390,6 @@ class LiveTransmitionHistory extends ObjectYPT { public static function getLatest($key, $live_servers_id = null, $active=false) { global $global; - $key = ($key); if (empty($key)) { return false; diff --git a/plugin/Live/Objects/Live_schedule.php b/plugin/Live/Objects/Live_schedule.php index 3246f68aa3..89d75f26a1 100644 --- a/plugin/Live/Objects/Live_schedule.php +++ b/plugin/Live/Objects/Live_schedule.php @@ -53,9 +53,7 @@ class Live_schedule extends ObjectYPT foreach ($fullData as $row) { $rows[] = $row; } - } else { - _error_log($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); - } + } return $rows; } @@ -74,9 +72,7 @@ class Live_schedule extends ObjectYPT foreach ($fullData as $row) { $rows[] = $row; } - } else { - _error_log($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); - } + } return $rows; } @@ -158,8 +154,6 @@ class Live_schedule extends ObjectYPT $rows[] = $row; } - } else { - die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $rows; } @@ -196,9 +190,7 @@ class Live_schedule extends ObjectYPT $row['serverURL'] = Live::getServerURL($row['key'], $row['users_id']); $rows[] = $row; } - } else { - die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); - } + } return $rows; } @@ -295,7 +287,10 @@ class Live_schedule extends ObjectYPT { return intval($this->live_servers_id); } - + /** + * + * @return string + */ public function getScheduled_time() { return $this->scheduled_time; @@ -358,8 +353,6 @@ class Live_schedule extends ObjectYPT $this->key = uniqid(); } - $this->description = ($this->description); - $this->_setTimeZone(date_default_timezone_get()); //$key = Live::getKeyFromUser($this->getUsers_id()); diff --git a/plugin/Live/Objects/Live_servers.php b/plugin/Live/Objects/Live_servers.php index 123b7a9cd5..d5451bb5ba 100644 --- a/plugin/Live/Objects/Live_servers.php +++ b/plugin/Live/Objects/Live_servers.php @@ -114,7 +114,9 @@ class Live_servers extends ObjectYPT { return trim($this->rtmp_server); } - + /** + * @return string + */ public function getPlayerServer() { return $this->playerServer; @@ -240,7 +242,6 @@ class Live_servers extends ObjectYPT $host = trim($rtmpHostURI); $parts = parse_url($host); $host = "rtmp://{$parts["host"]}{$parts["path"]}"; - $host = ($host); $sql = "SELECT * FROM " . static::getTableName() . " WHERE rtmp_server LIKE '%{$host}%' AND status = 'a' "; $res = sqlDAL::readSql($sql); $data = sqlDAL::fetchAssoc($res); diff --git a/plugin/PlayLists/View/getPlaylistButtons.php b/plugin/PlayLists/View/getPlaylistButtons.php index def99f7658..f22915d168 100644 --- a/plugin/PlayLists/View/getPlaylistButtons.php +++ b/plugin/PlayLists/View/getPlaylistButtons.php @@ -52,18 +52,12 @@ if ($isMyChannel) {
  • Desc 9-0
  • - +
    showChannelLiveTab){ position: relative; overflow: hidden; } + .feedDropdown{ + margin-right: 4px; + }
    @@ -148,7 +151,7 @@ if($advancedCustomUser->showChannelLiveTab){ } ?>
    -
    +

    getNameIdentificationBd(); @@ -161,6 +164,11 @@ if($advancedCustomUser->showChannelLiveTab){ echo getUserOnlineLabel($user_id, 'pull-right', 'padding: 0 5px;'); ?>