1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Replace from about only if about is not empty
This commit is contained in:
Daniel 2022-02-14 10:52:11 -03:00
parent 223c220aa4
commit e0225924e1
3 changed files with 6 additions and 3 deletions

View file

@ -26,7 +26,10 @@ if (!empty($_GET['channelName'])) {
$user = User::getChannelOwner($_GET['channelName']); $user = User::getChannelOwner($_GET['channelName']);
$showOnlyLoggedUserVideos = $user['id']; $showOnlyLoggedUserVideos = $user['id'];
$title = User::getNameIdentificationById($user['id']); $title = User::getNameIdentificationById($user['id']);
$description = User::getDescriptionById($user['id'], true); $about = User::getDescriptionById($user['id'], true);
if(!isHTMLEmpty($about)){
$description = $about;
}
$link = User::getChannelLink($user['id']); $link = User::getChannelLink($user['id']);
$logo = User::getPhoto($user['id']); $logo = User::getPhoto($user['id']);
} }

View file

@ -7724,7 +7724,7 @@ function isImage($file) {
} }
function isHTMLEmpty($html_string) { function isHTMLEmpty($html_string) {
return empty(trim(strip_specific_tags($html_string, ['br', 'p']))); return empty(trim(str_replace(array("\r", "\n"), array('', ''), strip_specific_tags($html_string, ['br', 'p']))));
} }
function totalImageColors($image_path) { function totalImageColors($image_path) {

View file

@ -388,7 +388,7 @@ if (typeof gtag !== \"function\") {
$about = br2nl($about); $about = br2nl($about);
$about = strip_tags($about); $about = strip_tags($about);
} }
return $about; return trim($about);
} }
public static function getAboutFromId($id) { public static function getAboutFromId($id) {