diff --git a/objects/EpgParser.php b/objects/EpgParser.php index 02953ec046..4c8bc06f49 100644 --- a/objects/EpgParser.php +++ b/objects/EpgParser.php @@ -42,14 +42,14 @@ class EpgParser { } /** - * @param mixed $url - url + * @param mixed $url - url */ public function setUrl($url): void { $this->url = $url; } /** - * @param mixed $content = xml parsed string. + * @param mixed $content = xml parsed string. */ public function setContent($content): void { $this->content = $content; @@ -78,7 +78,7 @@ class EpgParser { /** * Set group by for channels must be channels atribute. - * @param $group - channel will be grouped with. must be @id or pgram attribute. + * @param $group - channel will be grouped with. must be @id or pgram attribute. */ public function setChannelGroup($group) { $this->channels_groupby = $group; @@ -103,9 +103,9 @@ class EpgParser { $dt->setTimezone(new DateTimeZone($this->targetTimeZone)); return $dt->format('Y-m-d H:i:s'); } catch (\Exception $e) { - + } catch (\Error $e) { - + } try { @@ -113,9 +113,9 @@ class EpgParser { $dt->setTimezone(new DateTimeZone($this->targetTimeZone)); return $dt->format('Y-m-d H:i:s'); } catch (\Exception $e) { - + } catch (\Error $e) { - + } @@ -134,9 +134,9 @@ class EpgParser { $dt->setTimezone(new DateTimeZone($this->targetTimeZone)); return $dt->format('Y-m-d H:i:s'); } catch (\Exception $e) { - + } catch (\Error $e) { - + } @@ -170,14 +170,14 @@ class EpgParser { } /** - * + * */ public function resetChannelfilter(): void { $this->channelfilter = []; } /** - * + * */ private function channelMatchFilter(string $channel): bool { return array_key_exists($channel, $this->channelfilter); @@ -197,7 +197,7 @@ class EpgParser { throw new \RuntimeException('file does not exists: ' . $this->file); } - // + // $xml = new XMLReader(); // compress.zlib://' @@ -207,7 +207,7 @@ class EpgParser { /** @noinspection LoopWhichDoesNotLoopInspection */ /** @noinspection MissingOrEmptyGroupStatementInspection */ while ($xml->read() && $xml->name !== 'channel') { - + } $i = 0; @@ -261,7 +261,7 @@ class EpgParser { /** @noinspection LoopWhichDoesNotLoopInspection */ /** @noinspection MissingOrEmptyGroupStatementInspection */ while ($xml->read() && $xml->name !== 'programme') { - + } while ($xml->name === 'programme') { @@ -388,5 +388,4 @@ class EpgParser { throw new \RuntimeException("Content of this request its not XML: $errors"); } } - } diff --git a/objects/Object.php b/objects/Object.php index 4a97729f97..dfb72e58c0 100644 --- a/objects/Object.php +++ b/objects/Object.php @@ -372,9 +372,9 @@ abstract class ObjectYPT implements ObjectInterface $insert_row = sqlDAL::writeSql($sql, $formats, $values); /** - * + * * @var array $global - * @var object $global['mysqli'] + * @var object $global['mysqli'] */ if ($insert_row) { if (empty($this->id)) { diff --git a/objects/aVideoEncoder.json.php b/objects/aVideoEncoder.json.php index 2c8a008d1e..6b9d8e290c 100644 --- a/objects/aVideoEncoder.json.php +++ b/objects/aVideoEncoder.json.php @@ -69,7 +69,7 @@ if (empty($title) && !empty($_POST['title'])) { $title = $video->setTitle($_POST['title']); } elseif (empty($title)) { $video->setTitle("Automatic Title"); -}else{ +}else{ _error_log("aVideoEncoder.json: Title not updated {$_POST['title']} "); } diff --git a/objects/categories.json.php b/objects/categories.json.php index e9c1609cec..a9d7dad9bb 100644 --- a/objects/categories.json.php +++ b/objects/categories.json.php @@ -27,7 +27,7 @@ $total = Category::getTotalCategories(true, $onlyWithVideos); 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{ diff --git a/objects/category.php b/objects/category.php index 0c4dfaecb0..57bd1f1086 100644 --- a/objects/category.php +++ b/objects/category.php @@ -182,7 +182,7 @@ class Category { } } /** - * + * * @param string $clean_title * @param int $count * @param int $id @@ -440,11 +440,11 @@ class Category { //_error_log("getAllCategories id={$row['id']} line=".__LINE__); $totals = self::getTotalFromCategory($row['id']); - + if($onlyWithVideos && empty($totals['total'])){ continue; } - + //_error_log("getAllCategories id={$row['id']} line=".__LINE__); $fullTotals = self::getTotalFromCategory($row['id'], false, true, true); @@ -988,5 +988,4 @@ class Category { } return $return; } - } diff --git a/objects/categoryAddNew.json.php b/objects/categoryAddNew.json.php index 6e42708823..d703cf9ba2 100644 --- a/objects/categoryAddNew.json.php +++ b/objects/categoryAddNew.json.php @@ -48,7 +48,7 @@ if (!empty($obj->categories_id)) { $obj->image2 = saveCroppieImage($path['path'], "image2"); $obj->image2P = $path['path']; _error_log('CategoryAddnew: save image 2 '.$path['path']); - + // save usergroups _error_log('CategoryAddnew: save usergroups '. json_encode($obj->usergroups_ids_array)); Category::setUsergroups($obj->categories_id, $obj->usergroups_ids_array); diff --git a/objects/comment.php b/objects/comment.php index 30535a3633..cf7f78cc67 100644 --- a/objects/comment.php +++ b/objects/comment.php @@ -29,7 +29,7 @@ class Comment { $this->load($id); } } - + public function getPin() { return $this->pin; } @@ -37,7 +37,7 @@ class Comment { public function setPin($pin): void { $this->pin = intval($pin); } - + public function getId() { return $this->id; } @@ -87,7 +87,7 @@ class Comment { if (empty($this->comments_id_pai)) { $this->comments_id_pai = 'NULL'; } - + $this->pin = intval($this->pin); if (empty($this->videos_id) && !empty($this->comments_id_pai)) { @@ -375,13 +375,13 @@ class Comment { return $commentsArray; } - static function addExtraInfo2($row) { + static function addExtraInfo2($row) { if(empty($row['commentHTML'])){ $row['comment'] = str_replace('\n', "\n", $row['comment']); $row['commentPlain'] = xss_esc_back($row['comment']); $row['commentHTML'] = nl2br($row['commentPlain']); } - + $row['identification'] = User::getNameIdentificationById($row['users_id']); $row['commentWithLinks'] = self::fixCommentText(textToLink($row['commentHTML'])); $row['humanTiming'] = humanTiming(strtotime($row['created'])); @@ -408,5 +408,4 @@ class Comment { $replace = ["
"]; return stripslashes(str_replace($search, $replace, $subject)); } - } diff --git a/objects/commentAddNew.json.php b/objects/commentAddNew.json.php index 6bc886eea6..7c92cb5313 100644 --- a/objects/commentAddNew.json.php +++ b/objects/commentAddNew.json.php @@ -126,7 +126,7 @@ if (!empty($obj->comments_id)) { $obj->error = false; $obj->comment = Comment::getComment($obj->comments_id); $obj->comment = Comment::addExtraInfo2($obj->comment); - + $obj->msg = __("Your comment has been saved!"); } else { $obj->msg = __("Your comment has NOT been saved!"); diff --git a/objects/commentDelete.json.php b/objects/commentDelete.json.php index 6ab8494674..0ab7a1f50b 100644 --- a/objects/commentDelete.json.php +++ b/objects/commentDelete.json.php @@ -29,7 +29,7 @@ if(!empty($obj->status)){ $obj->error = false; //$obj->comments = Comment::getAllComments($obj->videos_id); //$obj->comments = Comment::addExtraInfo($obj->comments); - + } die(_json_encode($obj)); diff --git a/objects/commentPinToogle.json.php b/objects/commentPinToogle.json.php index 1488f77393..eeed62b0c5 100644 --- a/objects/commentPinToogle.json.php +++ b/objects/commentPinToogle.json.php @@ -31,7 +31,7 @@ $obj->save = $objC->save(); if (!empty($obj->save)) { $obj->error = false; $obj->comment = Comment::getComment($obj->comments_id); - $obj->comment = Comment::addExtraInfo2($obj->comment); + $obj->comment = Comment::addExtraInfo2($obj->comment); if($obj->new_pin_value){ $obj->msg = __("Your comment is pinned"); }else{ diff --git a/objects/functionCroppie.php b/objects/functionCroppie.php index c5a8bcb09a..23a8e04a55 100644 --- a/objects/functionCroppie.php +++ b/objects/functionCroppie.php @@ -36,14 +36,14 @@ $croppieFilesAdded = 1; var viewportHeight = ; var boundaryWidth = ; var boundaryHeight = ; - + var parentWidth = $('#croppie').parent().width(); var totalWidth = viewportWidth+(boundaryWidth-viewportWidth); - + if(parentWidth <= totalWidth){ var factor = (parentWidth/(totalWidth)); console.log('createCroppie parent and factor ', parentWidth, totalWidth, factor, viewportWidth, viewportHeight, boundaryWidth, boundaryHeight); - + viewportWidth = parseInt(viewportWidth * factor); viewportHeight = parseInt(viewportHeight * factor); boundaryWidth = viewportWidth; @@ -53,20 +53,20 @@ $croppieFilesAdded = 1; }else{ console.log('createCroppie ', viewportWidth, viewportHeight, boundaryWidth, boundaryHeight); } - + var paddingTop = 25; var saveButton = 55; var slider = 25; var uploadDeleteButtons = 40; var parentHeight = $('body').height(); - + var totalHeight = viewportHeight+(boundaryHeight-viewportHeight)+paddingTop+saveButton+slider+uploadDeleteButtons; - + if(parentHeight <= totalHeight){ var factor = (parentHeight/(totalHeight)); console.log('createCroppie height parent and factor parentHeight, totalHeight', parentHeight, totalHeight); console.log('createCroppie height parent and factor factor, viewportWidth, viewportHeight', factor, viewportWidth, viewportHeight); - + viewportWidth = parseInt(viewportWidth * factor); viewportHeight = parseInt(viewportHeight * factor); boundaryWidth = viewportWidth; @@ -77,7 +77,7 @@ $croppieFilesAdded = 1; console.log('createCroppie height', parentHeight, totalHeight, viewportHeight, boundaryWidth, boundaryHeight); } - + uploadCrop = $('#croppie').croppie({ //url: imageURL, //enableExif: true, @@ -112,7 +112,7 @@ $croppieFilesAdded = 1; - $('#croppie').croppie('setZoom', ); + $('#croppie').croppie('setZoom', ); diff --git a/objects/functionGetHamburgerButton.php b/objects/functionGetHamburgerButton.php index e3672fdeb3..162035e53f 100644 --- a/objects/functionGetHamburgerButton.php +++ b/objects/functionGetHamburgerButton.php @@ -5,7 +5,7 @@ if ($startActive) { $svgClass .= ' active'; } 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 ); }else{ @@ -28,7 +28,7 @@ if ($invert) { - + - + - + - - - - diff --git a/objects/functionogSite.php b/objects/functionogSite.php index 0252a75a1d..0650bc9d52 100644 --- a/objects/functionogSite.php +++ b/objects/functionogSite.php @@ -18,7 +18,7 @@ if ($users_id = isChannel()) { $img = Category::getOGImage($category['id']); $title = html2plainText($category['name']); $url = Category::getCategoryLinkFromName($_GET['catName']); - $description = html2plainText($category['description']); + $description = html2plainText($category['description']); echo PHP_EOL."".PHP_EOL; ?> @@ -85,4 +85,4 @@ if (!empty($advancedCustom->twitter_summary_large_image)) { - \ No newline at end of file + diff --git a/objects/functions.php b/objects/functions.php index c5e1f3f08b..d714086160 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -436,7 +436,7 @@ function safeString($text, $strict = false, $try=0){ //$text = cleanURLName($text); } $text = trim($text); - + if(empty($try) && empty($text)){ return safeString(utf8_encode($originalText), $strict, 1); } @@ -1433,7 +1433,7 @@ function getVideosURL_V2($fileName, $recreateCache = false) $cacheName = "getVideosURL_V2$fileName"; if (empty($recreateCache)) { - + $lifetime = maxLifetime(); $TimeLog1 = "getVideosURL_V2($fileName) empty recreateCache"; @@ -1496,7 +1496,7 @@ function getVideosURL_V2($fileName, $recreateCache = false) $isAVideo = false; foreach ($filesInDir as $file) { $parts = pathinfo($file); - + if($parts['extension'] == 'log'){ continue; } @@ -1555,7 +1555,7 @@ function getVideosURL_V2($fileName, $recreateCache = false) $files[$key] = AVideoPlugin::modifyURL($_file); } TimeLogEnd($timeName, __LINE__); - + $pdf = $paths['path'] . "{$cleanfilename}.pdf"; $mp3 = $paths['path'] . "{$cleanfilename}.mp3"; @@ -1577,7 +1577,7 @@ function getVideosURL_V2($fileName, $recreateCache = false) $extraFiles = array_merge($extraFiles, $extraFilesMP3); } $files = array_merge($extraFiles, $files); - + ObjectYPT::setCache($cacheName, $files); } if (is_array($files)) { @@ -2004,7 +2004,7 @@ function scaleUpImage($file_src, $file_dest, $wd, $hd) echo '

Results

'; var_dump($sizes);exit; } - * + * */ $thumb_w = $sizes['w']; $thumb_h = $sizes['h']; @@ -4704,9 +4704,9 @@ function _mysql_commit(){ if (_mysql_is_open()) { try { /** - * + * * @var array $global - * @var object $global['mysqli'] + * @var object $global['mysqli'] */ @$global['mysqli']->commit(); } catch (Exception $exc) { @@ -4723,9 +4723,9 @@ function _mysql_close() $mysql_connect_was_closed = 1; try { /** - * + * * @var array $global - * @var object $global['mysqli'] + * @var object $global['mysqli'] */ @$global['mysqli']->close(); } catch (Exception $exc) { @@ -4968,7 +4968,7 @@ function getUsageFromFilename($filename, $dir = "") * @param $url - The location of the remote file to download. Cannot * be null or empty. * - * @return int + * @return int * return The size of the file referenced by $url, or false if the size * could not be determined. */ @@ -5796,14 +5796,14 @@ function isValidEmail($email) { if(!isset($_email_hosts_checked)){ $_email_hosts_checked = array(); } - + //Get host name from email and check if it is valid $email_host = array_slice(explode("@", $email), -1)[0]; if(isset($_email_hosts_checked[$email_host])){ return $_email_hosts_checked[$email_host]; } - + $_email_hosts_checked[$email_host] = true; // Check if valid IP (v4 or v6). If it is we can't do a DNS lookup if (!filter_var($email_host, FILTER_VALIDATE_IP, [ @@ -9408,9 +9408,9 @@ function mysqlBeginTransaction() global $global; _error_log('Begin transaction ' . getSelfURI()); /** - * + * * @var array $global - * @var object $global['mysqli'] + * @var object $global['mysqli'] */ $global['mysqli']->autocommit(false); } @@ -9420,9 +9420,9 @@ function mysqlRollback() global $global; _error_log('Rollback transaction ' . getSelfURI(), AVideoLog::$ERROR); /** - * + * * @var array $global - * @var object $global['mysqli'] + * @var object $global['mysqli'] */ $global['mysqli']->rollback(); $global['mysqli']->autocommit(true); @@ -9433,9 +9433,9 @@ function mysqlCommit() global $global; _error_log('Commit transaction ' . getSelfURI()); /** - * + * * @var array $global - * @var object $global['mysqli'] + * @var object $global['mysqli'] */ $global['mysqli']->commit(); $global['mysqli']->autocommit(true); @@ -10087,9 +10087,9 @@ function getValidCrontabLines() } /** - * - * @param string $strOrArray - * @return string return an array with the valid emails. + * + * @param string $strOrArray + * @return string return an array with the valid emails. */ function is_email($strOrArray) { @@ -10510,7 +10510,7 @@ function getFeedButton($rss, $mrss, $roku) { $buttons = '