update doco and fix safemode

This commit is contained in:
Mario Vavti
2023-04-27 11:00:43 +02:00
parent f72fb974a9
commit e6ec87f910
2 changed files with 7 additions and 7 deletions

View File

@@ -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;
*/

View File

@@ -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, '<br>');
}
$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,