From e6ec87f910edf1f56871512738da3d8631599864 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 27 Apr 2023 11:00:43 +0200 Subject: update doco and fix safemode --- Zotlabs/Lib/Libzotdir.php | 7 +++---- Zotlabs/Module/Directory.php | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php index 2c33b6a27..d3772f2dc 100644 --- a/Zotlabs/Lib/Libzotdir.php +++ b/Zotlabs/Lib/Libzotdir.php @@ -172,13 +172,12 @@ class Libzotdir { } /** - * @brief Checks the directory mode of this hub. + * @brief fetches updates from known directories * * Checks the directory mode of this hub to see if it is some form of directory server. If it is, * get the directory realm of this hub. Fetch a list of all other directory servers in this realm and request - * a directory sync packet. This will contain both directory updates and new ratings. Store these all in the DB. - * In the case of updates, we will query each of them asynchronously from a poller task. Ratings are stored - * directly if the rater's signature matches. + * a directory sync packet. Store these all in the DB. + * In the case of updates, we will query each of them asynchronously from a poller task. * * @param int $dirmode; */ diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php index 4ce19c3a8..dc10d38c0 100644 --- a/Zotlabs/Module/Directory.php +++ b/Zotlabs/Module/Directory.php @@ -299,10 +299,11 @@ class Directory extends Controller { $hometown = ((x($profile,'hometown') == 1) ? html2plain($profile['hometown']) : False); $about = ((x($profile,'about') == 1) ? zidify_links(bbcode($profile['about'], ['tryoembed' => false])) : False); - if ($about && $safe_mode) { - $about = html2plain($about); + if ($about && $safe_mode > 0) { + $about = strip_tags($about, '
'); } + $keywords = ((x($profile,'keywords')) ? $profile['keywords'] : ''); @@ -362,7 +363,7 @@ class Directory extends Controller { 'censor_2_class' => ((intval($rr['censored']) > 1) ? '' : '-outline'), 'marital' => $marital, 'homepage' => $homepage, - 'homepageurl' => (($safe_mode) ? $homepageurl : linkify($homepageurl)), + 'homepageurl' => (($safe_mode > 0) ? $homepageurl : linkify($homepageurl)), 'hometown' => $hometown, 'hometown_label' => t('Hometown:'), 'about' => $about, -- cgit v1.2.3