aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzotdir.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-05-03 15:25:47 +0200
committerMario Vavti <mario@mariovavti.com>2023-05-03 15:25:47 +0200
commitffbaa7e4dcda787897263c6cc4d13671f1fc6ed6 (patch)
tree619827ec7c88d41f9ffe1195c91cd8ddcaa8f5e7 /Zotlabs/Lib/Libzotdir.php
parentdf420361000a33f3e6f6982954c21a1c7a3168cf (diff)
downloadvolse-hubzilla-ffbaa7e4dcda787897263c6cc4d13671f1fc6ed6.tar.gz
volse-hubzilla-ffbaa7e4dcda787897263c6cc4d13671f1fc6ed6.tar.bz2
volse-hubzilla-ffbaa7e4dcda787897263c6cc4d13671f1fc6ed6.zip
when flagging an entry also flag its xtags and improved keywords query in dirsearch
Diffstat (limited to 'Zotlabs/Lib/Libzotdir.php')
-rw-r--r--Zotlabs/Lib/Libzotdir.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php
index e30ccc43c..8e729f7e6 100644
--- a/Zotlabs/Lib/Libzotdir.php
+++ b/Zotlabs/Lib/Libzotdir.php
@@ -522,6 +522,10 @@ class Libzotdir {
if (array_key_exists('keywords', $profile) and is_array($profile['keywords'])) {
self::import_directory_keywords($hash,$profile['keywords']);
foreach ($profile['keywords'] as $kw) {
+ if (in_array($kw, $clean)) {
+ continue;
+ }
+
$kw = trim(htmlspecialchars($kw,ENT_COMPAT, 'UTF-8', false));
$kw = trim($kw, ',');
$clean[] = $kw;
@@ -652,6 +656,10 @@ class Libzotdir {
$clean = array();
foreach($keywords as $kw) {
+ if (in_array($kw, $clean)) {
+ continue;
+ }
+
$kw = trim(htmlspecialchars($kw,ENT_COMPAT, 'UTF-8', false));
$kw = trim($kw, ',');
$clean[] = $kw;