mirror of
https://github.com/friendica/friendica
synced 2025-05-01 01:04:36 +02:00
Improve SQL-Queries / fixed "fetch_parents" setting
This commit is contained in:
parent
bbbbf8fd6b
commit
548b7f43a5
4 changed files with 8 additions and 8 deletions
|
@ -55,11 +55,11 @@ class UpdateContacts
|
|||
$ids = self::getContactsToUpdate($condition, $limit, []);
|
||||
Logger::info('Fetched federated user contacts', ['count' => count($ids)]);
|
||||
|
||||
$conditions = ["`id` IN (SELECT `author-id` FROM `post` WHERE `author-id` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `owner-id` FROM `post` WHERE `owner-id` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `causer-id` FROM `post` WHERE `causer-id` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `cid` FROM `post-tag` WHERE `cid` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `cid` FROM `user-contact` WHERE `cid` = `contact`.`id`)"];
|
||||
$conditions = ["`id` IN (SELECT `author-id` FROM `post`)",
|
||||
"`id` IN (SELECT `owner-id` FROM `post`)",
|
||||
"`id` IN (SELECT `causer-id` FROM `post` WHERE NOT `causer-id` IS NULL)",
|
||||
"`id` IN (SELECT `cid` FROM `post-tag`)",
|
||||
"`id` IN (SELECT `cid` FROM `user-contact`)"];
|
||||
|
||||
foreach ($conditions as $contact_condition) {
|
||||
$condition = DBA::mergeConditions($base_condition,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue