Merge pull request #13680 from annando/relation-queries

Improve performance on the contact relation queries
This commit is contained in:
Hypolite Petovan 2023-11-28 10:55:28 -05:00 committed by GitHub
commit d52d6a9e41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 196 additions and 171 deletions

View file

@ -482,12 +482,11 @@ class Relation
*/ */
public static function countFollows(int $cid, array $condition = []): int public static function countFollows(int $cid, array $condition = []): int
{ {
$condition = DBA::mergeConditions($condition, [ $condition = DBA::mergeConditions($condition, ["`cid` = ? and `follows`", $cid]);
'`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`)', $sql = "SELECT COUNT(*) AS `total` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `relation-cid` WHERE " . array_shift($condition);
$cid,
]);
return DI::dba()->count('contact', $condition); $result = DBA::fetchFirst($sql, $condition);
return $result['total'] ?? 0;
} }
/** /**
@ -497,20 +496,18 @@ class Relation
* @param array $condition Additional condition on the contact table * @param array $condition Additional condition on the contact table
* @param int $count * @param int $count
* @param int $offset * @param int $offset
* @param bool $shuffle
* @return array * @return array
* @throws Exception * @throws Exception
*/ */
public static function listFollows(int $cid, array $condition = [], int $count = 30, int $offset = 0, bool $shuffle = false) public static function listFollows(int $cid, array $condition = [], int $count = 30, int $offset = 0)
{ {
$condition = DBA::mergeConditions($condition, $condition = DBA::mergeConditions($condition, ["`cid` = ? and `follows`", $cid]);
['`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`)', $sql = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `relation-cid` WHERE " . array_shift($condition);
$cid] if ($count > 0) {
); $sql .= " LIMIT ?, ?";
$condition = array_merge($condition, [$offset, $count]);
return DI::dba()->selectToArray('contact', [], $condition, }
['limit' => [$offset, $count], 'order' => [$shuffle ? 'RAND()' : 'name']] return DBA::toArray(DBA::p($sql, $condition));
);
} }
/** /**
@ -523,12 +520,11 @@ class Relation
*/ */
public static function countFollowers(int $cid, array $condition = []) public static function countFollowers(int $cid, array $condition = [])
{ {
$condition = DBA::mergeConditions($condition, $condition = DBA::mergeConditions($condition, ["`relation-cid` = ? and `follows`", $cid]);
['`id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `follows`)', $sql = "SELECT COUNT(*) AS `total` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " . array_shift($condition);
$cid]
);
return DI::dba()->count('contact', $condition); $result = DBA::fetchFirst($sql, $condition);
return $result['total'] ?? 0;
} }
/** /**
@ -538,19 +534,18 @@ class Relation
* @param array $condition Additional condition on the contact table * @param array $condition Additional condition on the contact table
* @param int $count * @param int $count
* @param int $offset * @param int $offset
* @param bool $shuffle
* @return array * @return array
* @throws Exception * @throws Exception
*/ */
public static function listFollowers(int $cid, array $condition = [], int $count = 30, int $offset = 0, bool $shuffle = false) public static function listFollowers(int $cid, array $condition = [], int $count = 30, int $offset = 0)
{ {
$condition = DBA::mergeConditions($condition, $condition = DBA::mergeConditions($condition, ["`relation-cid` = ? and `follows`", $cid]);
['`id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `follows`)', $cid] $sql = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " . array_shift($condition);
); if ($count > 0) {
$sql .= " LIMIT ?, ?";
return DI::dba()->selectToArray('contact', [], $condition, $condition = array_merge($condition, [$offset, $count]);
['limit' => [$offset, $count], 'order' => [$shuffle ? 'RAND()' : 'name']] }
); return DBA::toArray(DBA::p($sql, $condition));
} }
/** /**
@ -563,13 +558,21 @@ class Relation
*/ */
public static function countMutuals(int $cid, array $condition = []) public static function countMutuals(int $cid, array $condition = [])
{ {
$condition = DBA::mergeConditions($condition, $condition1 = DBA::mergeConditions($condition, ["`cid` = ? and `follows`", $cid]);
['`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`) $condition2 = DBA::mergeConditions($condition, ["`relation-cid` = ? and `follows`", $cid]);
AND `id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `follows`)', $sql1 = "SELECT `contact`.`id` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `relation-cid` WHERE " . array_shift($condition1);
$cid, $cid] $sql2 = "SELECT `contact`.`id` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " . array_shift($condition2);
); $union = array_merge($condition1, $condition2);
$sql = $sql1 . " INTERSECT " . $sql2;
return DI::dba()->count('contact', $condition); $contacts = 0;
$query = DBA::p($sql, $union);
while (DBA::fetch($query)) {
$contacts++;
}
DBA::close($query);
return $contacts;
} }
/** /**
@ -579,24 +582,24 @@ class Relation
* @param array $condition Additional condition on the contact table * @param array $condition Additional condition on the contact table
* @param int $count * @param int $count
* @param int $offset * @param int $offset
* @param bool $shuffle
* @return array * @return array
* @throws Exception * @throws Exception
*/ */
public static function listMutuals(int $cid, array $condition = [], int $count = 30, int $offset = 0, bool $shuffle = false) public static function listMutuals(int $cid, array $condition = [], int $count = 30, int $offset = 0)
{ {
$condition = DBA::mergeConditions($condition, $condition1 = DBA::mergeConditions($condition, ["`cid` = ? and `follows`", $cid]);
['`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`) $condition2 = DBA::mergeConditions($condition, ["`relation-cid` = ? and `follows`", $cid]);
AND `id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `follows`)', $sql1 = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `relation-cid` WHERE " . array_shift($condition1);
$cid, $cid] $sql2 = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " . array_shift($condition2);
); $union = array_merge($condition1, $condition2);
$sql = $sql1 . " INTERSECT " . $sql2;
return DI::dba()->selectToArray('contact', [], $condition, if ($count > 0) {
['limit' => [$offset, $count], 'order' => [$shuffle ? 'RAND()' : 'name']] $sql .= " LIMIT ?, ?";
); $union = array_merge($union, [$offset, $count]);
}
return DBA::toArray(DBA::p($sql, $union));
} }
/** /**
* Counts the number of contacts with any relationship with the provided public contact. * Counts the number of contacts with any relationship with the provided public contact.
* *
@ -607,13 +610,21 @@ class Relation
*/ */
public static function countAll(int $cid, array $condition = []) public static function countAll(int $cid, array $condition = [])
{ {
$condition = DBA::mergeConditions($condition, $condition1 = DBA::mergeConditions($condition, ["`cid` = ? and `follows`", $cid]);
['(`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`) $condition2 = DBA::mergeConditions($condition, ["`relation-cid` = ? and `follows`", $cid]);
OR `id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `follows`))', $sql1 = "SELECT `contact`.`id` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `relation-cid` WHERE " . array_shift($condition1);
$cid, $cid] $sql2 = "SELECT `contact`.`id` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " .array_shift($condition2);
); $union = array_merge($condition1, $condition2);
$sql = $sql1 . " UNION " . $sql2;
return DI::dba()->count('contact', $condition); $contacts = 0;
$query = DBA::p($sql, $union);
while (DBA::fetch($query)) {
$contacts++;
}
DBA::close($query);
return $contacts;
} }
/** /**
@ -623,21 +634,22 @@ class Relation
* @param array $condition Additional condition on the contact table * @param array $condition Additional condition on the contact table
* @param int $count * @param int $count
* @param int $offset * @param int $offset
* @param bool $shuffle
* @return array * @return array
* @throws Exception * @throws Exception
*/ */
public static function listAll(int $cid, array $condition = [], int $count = 30, int $offset = 0, bool $shuffle = false) public static function listAll(int $cid, array $condition = [], int $count = 30, int $offset = 0)
{ {
$condition = DBA::mergeConditions($condition, $condition1 = DBA::mergeConditions($condition, ["`cid` = ? and `follows`", $cid]);
['(`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`) $condition2 = DBA::mergeConditions($condition, ["`relation-cid` = ? and `follows`", $cid]);
OR `id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `follows`))', $sql1 = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `relation-cid` WHERE " . array_shift($condition1);
$cid, $cid] $sql2 = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " .array_shift($condition2);
); $union = array_merge($condition1, $condition2);
$sql = $sql1 . " UNION " . $sql2;
return DI::dba()->selectToArray('contact', [], $condition, if ($count > 0) {
['limit' => [$offset, $count], 'order' => [$shuffle ? 'RAND()' : 'name']] $sql .= " LIMIT ?, ?";
); $union = array_merge($union, [$offset, $count]);
}
return DBA::toArray(DBA::p($sql, $union));
} }
/** /**
@ -652,13 +664,21 @@ class Relation
*/ */
public static function countCommon(int $sourceId, int $targetId, array $condition = []) public static function countCommon(int $sourceId, int $targetId, array $condition = [])
{ {
$condition = DBA::mergeConditions($condition, $condition1 = DBA::mergeConditions($condition, ["`relation-cid` = ?", $sourceId]);
['`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ?) $condition2 = DBA::mergeConditions($condition, ["`relation-cid` = ?", $targetId]);
AND `id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ?)', $sql1 = "SELECT `contact`.`id` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " . array_shift($condition1);
$sourceId, $targetId] $sql2 = "SELECT `contact`.`id` FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " .array_shift($condition2);
); $union = array_merge($condition1, $condition2);
$sql = $sql1 . " INTERSECT " . $sql2;
return DI::dba()->count('contact', $condition); $contacts = 0;
$query = DBA::p($sql, $union);
while (DBA::fetch($query)) {
$contacts++;
}
DBA::close($query);
return $contacts;
} }
/** /**
@ -670,21 +690,22 @@ class Relation
* @param array $condition Additional condition on the contact table * @param array $condition Additional condition on the contact table
* @param int $count * @param int $count
* @param int $offset * @param int $offset
* @param bool $shuffle
* @return array|bool Array on success, false on failure * @return array|bool Array on success, false on failure
* @throws Exception * @throws Exception
*/ */
public static function listCommon(int $sourceId, int $targetId, array $condition = [], int $count = 30, int $offset = 0, bool $shuffle = false) public static function listCommon(int $sourceId, int $targetId, array $condition = [], int $count = 30, int $offset = 0)
{ {
$condition = DBA::mergeConditions($condition, $condition1 = DBA::mergeConditions($condition, ["`relation-cid` = ?", $sourceId]);
["`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ?) $condition2 = DBA::mergeConditions($condition, ["`relation-cid` = ?", $targetId]);
AND `id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ?)", $sql1 = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " . array_shift($condition1);
$sourceId, $targetId] $sql2 = "SELECT `contact`.* FROM `contact-relation` INNER JOIN `contact` ON `contact`.`id` = `cid` WHERE " .array_shift($condition2);
); $union = array_merge($condition1, $condition2);
$sql = $sql1 . " INTERSECT " . $sql2;
return DI::dba()->selectToArray('contact', [], $condition, if ($count > 0) {
['limit' => [$offset, $count], 'order' => [$shuffle ? 'RAND()' : 'name']] $sql .= " LIMIT ?, ?";
); $union = array_merge($union, [$offset, $count]);
}
return DBA::toArray(DBA::p($sql, $union));
} }
/** /**

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2023.09-rc\n" "Project-Id-Version: 2023.09-rc\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-27 19:06+0000\n" "POT-Creation-Date: 2023-11-28 12:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -602,7 +602,7 @@ msgid "Rotate CCW (left)"
msgstr "" msgstr ""
#: mod/photos.php:1139 mod/photos.php:1195 mod/photos.php:1275 #: mod/photos.php:1139 mod/photos.php:1195 mod/photos.php:1275
#: src/Module/Contact.php:611 src/Module/Item/Compose.php:188 #: src/Module/Contact.php:618 src/Module/Item/Compose.php:188
#: src/Object/Post.php:1146 #: src/Object/Post.php:1146
msgid "This is you" msgid "This is you"
msgstr "" msgstr ""
@ -796,18 +796,22 @@ msgid "All contacts"
msgstr "" msgstr ""
#: src/BaseModule.php:439 src/Content/Conversation/Factory/Channel.php:45 #: src/BaseModule.php:439 src/Content/Conversation/Factory/Channel.php:45
#: src/Content/Widget.php:239 src/Core/ACL.php:195 src/Module/Contact.php:410 #: src/Content/Widget.php:239 src/Core/ACL.php:195 src/Module/Contact.php:414
#: src/Module/PermissionTooltip.php:141 src/Module/PermissionTooltip.php:163 #: src/Module/PermissionTooltip.php:141 src/Module/PermissionTooltip.php:163
#: src/Module/Settings/Channels.php:121 #: src/Module/Settings/Channels.php:121
msgid "Followers" msgid "Followers"
msgstr "" msgstr ""
#: src/BaseModule.php:444 src/Content/Widget.php:240 src/Module/Contact.php:413 #: src/BaseModule.php:444 src/Content/Widget.php:240 src/Module/Contact.php:417
#: src/Module/Settings/Channels.php:120 #: src/Module/Settings/Channels.php:120
msgid "Following" msgid "Following"
msgstr "" msgstr ""
#: src/BaseModule.php:452 #: src/BaseModule.php:449 src/Content/Widget.php:241 src/Module/Contact.php:420
msgid "Mutual friends"
msgstr ""
#: src/BaseModule.php:457
msgid "Common" msgid "Common"
msgstr "" msgstr ""
@ -1744,7 +1748,7 @@ msgid ""
msgstr "" msgstr ""
#: src/Content/GroupManager.php:152 src/Content/Nav.php:278 #: src/Content/GroupManager.php:152 src/Content/Nav.php:278
#: src/Content/Text/HTML.php:880 src/Content/Widget.php:536 #: src/Content/Text/HTML.php:880 src/Content/Widget.php:537
#: src/Model/User.php:1355 #: src/Model/User.php:1355
msgid "Groups" msgid "Groups"
msgstr "" msgstr ""
@ -1753,12 +1757,12 @@ msgstr ""
msgid "External link to group" msgid "External link to group"
msgstr "" msgstr ""
#: src/Content/GroupManager.php:158 src/Content/Widget.php:511 #: src/Content/GroupManager.php:158 src/Content/Widget.php:512
msgid "show less" msgid "show less"
msgstr "" msgstr ""
#: src/Content/GroupManager.php:159 src/Content/Widget.php:409 #: src/Content/GroupManager.php:159 src/Content/Widget.php:410
#: src/Content/Widget.php:512 #: src/Content/Widget.php:513
msgid "show more" msgid "show more"
msgstr "" msgstr ""
@ -1816,7 +1820,7 @@ msgstr ""
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
#: src/Content/Item.php:436 src/Module/Contact.php:460 #: src/Content/Item.php:436 src/Module/Contact.php:467
#: src/Module/Contact/Profile.php:511 #: src/Module/Contact/Profile.php:511
#: src/Module/Moderation/Blocklist/Contact.php:116 #: src/Module/Moderation/Blocklist/Contact.php:116
#: src/Module/Moderation/Users/Active.php:137 #: src/Module/Moderation/Users/Active.php:137
@ -1824,7 +1828,7 @@ msgstr ""
msgid "Block" msgid "Block"
msgstr "" msgstr ""
#: src/Content/Item.php:437 src/Module/Contact.php:461 #: src/Content/Item.php:437 src/Module/Contact.php:468
#: src/Module/Contact/Profile.php:519 #: src/Module/Contact/Profile.php:519
#: src/Module/Notifications/Introductions.php:134 #: src/Module/Notifications/Introductions.php:134
#: src/Module/Notifications/Introductions.php:206 #: src/Module/Notifications/Introductions.php:206
@ -1832,7 +1836,7 @@ msgstr ""
msgid "Ignore" msgid "Ignore"
msgstr "" msgstr ""
#: src/Content/Item.php:438 src/Module/Contact.php:462 #: src/Content/Item.php:438 src/Module/Contact.php:469
#: src/Module/Contact/Profile.php:527 #: src/Module/Contact/Profile.php:527
msgid "Collapse" msgid "Collapse"
msgstr "" msgstr ""
@ -1890,7 +1894,7 @@ msgid "Sign in"
msgstr "" msgstr ""
#: src/Content/Nav.php:229 src/Module/BaseProfile.php:57 #: src/Content/Nav.php:229 src/Module/BaseProfile.php:57
#: src/Module/Contact.php:504 #: src/Module/Contact.php:511
msgid "Conversations" msgid "Conversations"
msgstr "" msgstr ""
@ -1899,7 +1903,7 @@ msgid "Conversations you started"
msgstr "" msgstr ""
#: src/Content/Nav.php:230 src/Module/BaseProfile.php:49 #: src/Content/Nav.php:230 src/Module/BaseProfile.php:49
#: src/Module/BaseSettings.php:98 src/Module/Contact.php:496 #: src/Module/BaseSettings.php:98 src/Module/Contact.php:503
#: src/Module/Contact/Profile.php:419 src/Module/Profile/Profile.php:268 #: src/Module/Contact/Profile.php:419 src/Module/Profile/Profile.php:268
#: src/Module/Welcome.php:57 view/theme/frio/theme.php:230 #: src/Module/Welcome.php:57 view/theme/frio/theme.php:230
msgid "Profile" msgid "Profile"
@ -1919,7 +1923,7 @@ msgid "Your photos"
msgstr "" msgstr ""
#: src/Content/Nav.php:232 src/Module/BaseProfile.php:73 #: src/Content/Nav.php:232 src/Module/BaseProfile.php:73
#: src/Module/BaseProfile.php:76 src/Module/Contact.php:520 #: src/Module/BaseProfile.php:76 src/Module/Contact.php:527
#: view/theme/frio/theme.php:235 #: view/theme/frio/theme.php:235
msgid "Media" msgid "Media"
msgstr "" msgstr ""
@ -2005,8 +2009,8 @@ msgstr ""
#: src/Content/Nav.php:274 src/Content/Nav.php:329 #: src/Content/Nav.php:274 src/Content/Nav.php:329
#: src/Content/Text/HTML.php:876 src/Module/BaseProfile.php:127 #: src/Content/Text/HTML.php:876 src/Module/BaseProfile.php:127
#: src/Module/BaseProfile.php:130 src/Module/Contact.php:419 #: src/Module/BaseProfile.php:130 src/Module/Contact.php:426
#: src/Module/Contact.php:528 view/theme/frio/theme.php:243 #: src/Module/Contact.php:535 view/theme/frio/theme.php:243
msgid "Contacts" msgid "Contacts"
msgstr "" msgstr ""
@ -2259,7 +2263,7 @@ msgstr ""
msgid "Examples: Robert Morgenstein, Fishing" msgid "Examples: Robert Morgenstein, Fishing"
msgstr "" msgstr ""
#: src/Content/Widget.php:82 src/Module/Contact.php:453 #: src/Content/Widget.php:82 src/Module/Contact.php:460
#: src/Module/Directory.php:96 view/theme/vier/theme.php:197 #: src/Module/Directory.php:96 view/theme/vier/theme.php:197
msgid "Find" msgid "Find"
msgstr "" msgstr ""
@ -2291,7 +2295,7 @@ msgid "Local Directory"
msgstr "" msgstr ""
#: src/Content/Widget.php:215 src/Model/Circle.php:601 #: src/Content/Widget.php:215 src/Model/Circle.php:601
#: src/Module/Contact.php:396 src/Module/Welcome.php:76 #: src/Module/Contact.php:400 src/Module/Welcome.php:76
msgid "Circles" msgid "Circles"
msgstr "" msgstr ""
@ -2299,75 +2303,75 @@ msgstr ""
msgid "Everyone" msgid "Everyone"
msgstr "" msgstr ""
#: src/Content/Widget.php:241 src/Module/Contact.php:416 #: src/Content/Widget.php:242 src/Module/Contact.php:423
msgid "No relationship" msgid "No relationship"
msgstr "" msgstr ""
#: src/Content/Widget.php:246 #: src/Content/Widget.php:247
msgid "Relationships" msgid "Relationships"
msgstr "" msgstr ""
#: src/Content/Widget.php:248 src/Module/Circle.php:292 #: src/Content/Widget.php:249 src/Module/Circle.php:292
#: src/Module/Contact.php:340 #: src/Module/Contact.php:344
msgid "All Contacts" msgid "All Contacts"
msgstr "" msgstr ""
#: src/Content/Widget.php:287 #: src/Content/Widget.php:288
msgid "Protocols" msgid "Protocols"
msgstr "" msgstr ""
#: src/Content/Widget.php:289 #: src/Content/Widget.php:290
msgid "All Protocols" msgid "All Protocols"
msgstr "" msgstr ""
#: src/Content/Widget.php:317 #: src/Content/Widget.php:318
msgid "Saved Folders" msgid "Saved Folders"
msgstr "" msgstr ""
#: src/Content/Widget.php:319 src/Content/Widget.php:350 #: src/Content/Widget.php:320 src/Content/Widget.php:351
msgid "Everything" msgid "Everything"
msgstr "" msgstr ""
#: src/Content/Widget.php:348 #: src/Content/Widget.php:349
msgid "Categories" msgid "Categories"
msgstr "" msgstr ""
#: src/Content/Widget.php:405 #: src/Content/Widget.php:406
#, php-format #, php-format
msgid "%d contact in common" msgid "%d contact in common"
msgid_plural "%d contacts in common" msgid_plural "%d contacts in common"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Content/Widget.php:505 #: src/Content/Widget.php:506
msgid "Archives" msgid "Archives"
msgstr "" msgstr ""
#: src/Content/Widget.php:513 #: src/Content/Widget.php:514
msgid "On this date" msgid "On this date"
msgstr "" msgstr ""
#: src/Content/Widget.php:533 #: src/Content/Widget.php:534
msgid "Persons" msgid "Persons"
msgstr "" msgstr ""
#: src/Content/Widget.php:534 #: src/Content/Widget.php:535
msgid "Organisations" msgid "Organisations"
msgstr "" msgstr ""
#: src/Content/Widget.php:535 src/Model/Contact.php:1714 #: src/Content/Widget.php:536 src/Model/Contact.php:1714
msgid "News" msgid "News"
msgstr "" msgstr ""
#: src/Content/Widget.php:541 src/Module/Settings/Account.php:434 #: src/Content/Widget.php:542 src/Module/Settings/Account.php:434
msgid "Account Types" msgid "Account Types"
msgstr "" msgstr ""
#: src/Content/Widget.php:543 src/Module/Moderation/BaseUsers.php:69 #: src/Content/Widget.php:544 src/Module/Moderation/BaseUsers.php:69
msgid "All" msgid "All"
msgstr "" msgstr ""
#: src/Content/Widget.php:590 src/Module/BaseSettings.php:125 #: src/Content/Widget.php:591 src/Module/BaseSettings.php:125
#: src/Module/Settings/Channels.php:158 src/Module/Settings/Display.php:315 #: src/Module/Settings/Channels.php:158 src/Module/Settings/Display.php:315
msgid "Channels" msgid "Channels"
msgstr "" msgstr ""
@ -4430,7 +4434,7 @@ msgid "Policies"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:408 src/Module/Calendar/Event/Form.php:252 #: src/Module/Admin/Site.php:408 src/Module/Calendar/Event/Form.php:252
#: src/Module/Contact.php:539 src/Module/Profile/Profile.php:276 #: src/Module/Contact.php:546 src/Module/Profile/Profile.php:276
msgid "Advanced" msgid "Advanced"
msgstr "" msgstr ""
@ -5759,7 +5763,7 @@ msgstr ""
msgid "Item Source" msgid "Item Source"
msgstr "" msgstr ""
#: src/Module/BaseProfile.php:52 src/Module/Contact.php:499 #: src/Module/BaseProfile.php:52 src/Module/Contact.php:506
msgid "Profile Details" msgid "Profile Details"
msgstr "" msgstr ""
@ -6077,142 +6081,142 @@ msgid_plural "%d contacts edited."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Module/Contact.php:343 #: src/Module/Contact.php:347
msgid "Show all contacts" msgid "Show all contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:348 src/Module/Contact.php:424 #: src/Module/Contact.php:352 src/Module/Contact.php:431
#: src/Module/Moderation/BaseUsers.php:85 #: src/Module/Moderation/BaseUsers.php:85
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
#: src/Module/Contact.php:351 #: src/Module/Contact.php:355
msgid "Only show pending contacts" msgid "Only show pending contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:356 src/Module/Contact.php:427 #: src/Module/Contact.php:360 src/Module/Contact.php:434
#: src/Module/Moderation/BaseUsers.php:93 #: src/Module/Moderation/BaseUsers.php:93
msgid "Blocked" msgid "Blocked"
msgstr "" msgstr ""
#: src/Module/Contact.php:359 #: src/Module/Contact.php:363
msgid "Only show blocked contacts" msgid "Only show blocked contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:364 src/Module/Contact.php:433 #: src/Module/Contact.php:368 src/Module/Contact.php:440
#: src/Module/Settings/Server/Index.php:107 src/Object/Post.php:386 #: src/Module/Settings/Server/Index.php:107 src/Object/Post.php:386
msgid "Ignored" msgid "Ignored"
msgstr "" msgstr ""
#: src/Module/Contact.php:367 #: src/Module/Contact.php:371
msgid "Only show ignored contacts" msgid "Only show ignored contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:372 src/Module/Contact.php:436 #: src/Module/Contact.php:376 src/Module/Contact.php:443
msgid "Collapsed" msgid "Collapsed"
msgstr "" msgstr ""
#: src/Module/Contact.php:375 #: src/Module/Contact.php:379
msgid "Only show collapsed contacts" msgid "Only show collapsed contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:380 src/Module/Contact.php:439 #: src/Module/Contact.php:384 src/Module/Contact.php:446
msgid "Archived" msgid "Archived"
msgstr "" msgstr ""
#: src/Module/Contact.php:383 #: src/Module/Contact.php:387
msgid "Only show archived contacts" msgid "Only show archived contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:388 src/Module/Contact.php:430 #: src/Module/Contact.php:392 src/Module/Contact.php:437
msgid "Hidden" msgid "Hidden"
msgstr "" msgstr ""
#: src/Module/Contact.php:391 #: src/Module/Contact.php:395
msgid "Only show hidden contacts" msgid "Only show hidden contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:399 #: src/Module/Contact.php:403
msgid "Organize your contact circles" msgid "Organize your contact circles"
msgstr "" msgstr ""
#: src/Module/Contact.php:451 #: src/Module/Contact.php:458
msgid "Search your contacts" msgid "Search your contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:452 src/Module/Search/Index.php:207 #: src/Module/Contact.php:459 src/Module/Search/Index.php:207
#, php-format #, php-format
msgid "Results for: %s" msgid "Results for: %s"
msgstr "" msgstr ""
#: src/Module/Contact.php:459 #: src/Module/Contact.php:466
msgid "Update" msgid "Update"
msgstr "" msgstr ""
#: src/Module/Contact.php:460 src/Module/Contact/Profile.php:511 #: src/Module/Contact.php:467 src/Module/Contact/Profile.php:511
#: src/Module/Moderation/Blocklist/Contact.php:117 #: src/Module/Moderation/Blocklist/Contact.php:117
#: src/Module/Moderation/Users/Blocked.php:138 #: src/Module/Moderation/Users/Blocked.php:138
#: src/Module/Moderation/Users/Index.php:154 #: src/Module/Moderation/Users/Index.php:154
msgid "Unblock" msgid "Unblock"
msgstr "" msgstr ""
#: src/Module/Contact.php:461 src/Module/Contact/Profile.php:519 #: src/Module/Contact.php:468 src/Module/Contact/Profile.php:519
msgid "Unignore" msgid "Unignore"
msgstr "" msgstr ""
#: src/Module/Contact.php:462 src/Module/Contact/Profile.php:527 #: src/Module/Contact.php:469 src/Module/Contact/Profile.php:527
msgid "Uncollapse" msgid "Uncollapse"
msgstr "" msgstr ""
#: src/Module/Contact.php:464 #: src/Module/Contact.php:471
msgid "Batch Actions" msgid "Batch Actions"
msgstr "" msgstr ""
#: src/Module/Contact.php:507 #: src/Module/Contact.php:514
msgid "Conversations started by this contact" msgid "Conversations started by this contact"
msgstr "" msgstr ""
#: src/Module/Contact.php:512 #: src/Module/Contact.php:519
msgid "Posts and Comments" msgid "Posts and Comments"
msgstr "" msgstr ""
#: src/Module/Contact.php:515 #: src/Module/Contact.php:522
msgid "Individual Posts and Replies" msgid "Individual Posts and Replies"
msgstr "" msgstr ""
#: src/Module/Contact.php:523 #: src/Module/Contact.php:530
msgid "Posts containing media objects" msgid "Posts containing media objects"
msgstr "" msgstr ""
#: src/Module/Contact.php:531 #: src/Module/Contact.php:538
msgid "View all known contacts" msgid "View all known contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:542 #: src/Module/Contact.php:549
msgid "Advanced Contact Settings" msgid "Advanced Contact Settings"
msgstr "" msgstr ""
#: src/Module/Contact.php:578 #: src/Module/Contact.php:585
msgid "Mutual Friendship" msgid "Mutual Friendship"
msgstr "" msgstr ""
#: src/Module/Contact.php:582 #: src/Module/Contact.php:589
msgid "is a fan of yours" msgid "is a fan of yours"
msgstr "" msgstr ""
#: src/Module/Contact.php:586 #: src/Module/Contact.php:593
msgid "you are a fan of" msgid "you are a fan of"
msgstr "" msgstr ""
#: src/Module/Contact.php:604 #: src/Module/Contact.php:611
msgid "Pending outgoing contact request" msgid "Pending outgoing contact request"
msgstr "" msgstr ""
#: src/Module/Contact.php:606 #: src/Module/Contact.php:613
msgid "Pending incoming contact request" msgid "Pending incoming contact request"
msgstr "" msgstr ""
#: src/Module/Contact.php:619 src/Module/Contact/Profile.php:371 #: src/Module/Contact.php:626 src/Module/Contact/Profile.php:371
#, php-format #, php-format
msgid "Visit %s's profile [%s]" msgid "Visit %s's profile [%s]"
msgstr "" msgstr ""
@ -6258,39 +6262,51 @@ msgstr ""
msgid "No known contacts." msgid "No known contacts."
msgstr "" msgstr ""
#: src/Module/Contact/Contacts.php:100 src/Module/Profile/Common.php:128 #: src/Module/Contact/Contacts.php:103 src/Module/Profile/Common.php:128
msgid "No common contacts." msgid "No common contacts."
msgstr "" msgstr ""
#: src/Module/Contact/Contacts.php:112 src/Module/Profile/Contacts.php:135 #: src/Module/Contact/Contacts.php:115 src/Module/Profile/Contacts.php:135
#, php-format #, php-format
msgid "Follower (%s)" msgid "Follower (%s)"
msgid_plural "Followers (%s)" msgid_plural "Followers (%s)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Module/Contact/Contacts.php:116 src/Module/Profile/Contacts.php:138 #: src/Module/Contact/Contacts.php:119 src/Module/Profile/Contacts.php:138
#, php-format #, php-format
msgid "Following (%s)" msgid "Following (%s)"
msgid_plural "Following (%s)" msgid_plural "Following (%s)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Module/Contact/Contacts.php:120 src/Module/Profile/Common.php:116 #: src/Module/Contact/Contacts.php:123 src/Module/Profile/Contacts.php:141
#, php-format
msgid "Mutual friend (%s)"
msgid_plural "Mutual friends (%s)"
msgstr[0] ""
msgstr[1] ""
#: src/Module/Contact/Contacts.php:125 src/Module/Profile/Contacts.php:143
#, php-format
msgid "These contacts both follow and are followed by <strong>%s</strong>."
msgstr ""
#: src/Module/Contact/Contacts.php:131 src/Module/Profile/Common.php:116
#, php-format #, php-format
msgid "Common contact (%s)" msgid "Common contact (%s)"
msgid_plural "Common contacts (%s)" msgid_plural "Common contacts (%s)"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Module/Contact/Contacts.php:122 src/Module/Profile/Common.php:118 #: src/Module/Contact/Contacts.php:133 src/Module/Profile/Common.php:118
#, php-format #, php-format
msgid "" msgid ""
"Both <strong>%s</strong> and yourself have publicly interacted with these " "Both <strong>%s</strong> and yourself have publicly interacted with these "
"contacts (follow, comment or likes on public posts)." "contacts (follow, comment or likes on public posts)."
msgstr "" msgstr ""
#: src/Module/Contact/Contacts.php:128 src/Module/Profile/Contacts.php:149 #: src/Module/Contact/Contacts.php:139 src/Module/Profile/Contacts.php:149
#, php-format #, php-format
msgid "Contact (%s)" msgid "Contact (%s)"
msgid_plural "Contacts (%s)" msgid_plural "Contacts (%s)"
@ -8803,18 +8819,6 @@ msgstr ""
msgid "Remove" msgid "Remove"
msgstr "" msgstr ""
#: src/Module/Profile/Contacts.php:141
#, php-format
msgid "Mutual friend (%s)"
msgid_plural "Mutual friends (%s)"
msgstr[0] ""
msgstr[1] ""
#: src/Module/Profile/Contacts.php:143
#, php-format
msgid "These contacts both follow and are followed by <strong>%s</strong>."
msgstr ""
#: src/Module/Profile/Contacts.php:159 #: src/Module/Profile/Contacts.php:159
msgid "No contacts." msgid "No contacts."
msgstr "" msgstr ""