]> git.mxchange.org Git - friendica.git/commitdiff
Simply use "unsearchable" (and ensure it is updated for local users)
authorMichael <heluecht@pirati.ca>
Tue, 28 Mar 2023 06:34:09 +0000 (06:34 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 28 Mar 2023 06:34:09 +0000 (06:34 +0000)
src/Model/Contact.php
update.php

index 54689fb624afdbd4bf3faa390b255a0e97bddad3..d93c5f836706c0ef15aa5f3eccf1f65ca2e11b29 100644 (file)
@@ -3535,6 +3535,7 @@ class Contact
                        'server-blocked' => false,
                        'failed'         => false,
                        'deleted'        => false,
+                       'unsearchable'   => false,
                        'uid'            => $uid
                ];
 
@@ -3560,8 +3561,7 @@ class Contact
                }
 
                $condition = DBA::mergeConditions($condition,
-                       ["(NOT `unsearchable` OR `nurl` IN (SELECT `nurl` FROM `owner-view` WHERE `publish` OR `net-publish`))
-                       AND (`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", $search, $search, $search]);
+                       ["(`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", $search, $search, $search]);
 
                return DBA::selectToArray('account-user-view', [], $condition, $params);
        }
index 8dcd1b71dd2ce5d89fffb8176a467d19541e4b9c..3cd0a45a7b05ca64ac3ca9b48d978f9413def41c 100644 (file)
@@ -1315,3 +1315,14 @@ function update_1516()
 
        return Update::SUCCESS;
 }
+
+function update_1518()
+{
+       $users = DBA::select('user', ['uid']);
+       while ($user = DBA::fetch($users)) {
+               Contact::updateSelfFromUserID($user['uid']);
+       }
+       DBA::close($users);
+
+       return Update::SUCCESS;
+}