mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
Fix speed issues with the network page
This commit is contained in:
parent
ced0effa2a
commit
af6f6d4957
3 changed files with 22 additions and 10 deletions
|
@ -168,10 +168,17 @@ class Item
|
|||
$contact = DBA::selectFirst('contact', $fields, ['id' => $tagcid, 'uid' => $profile_uid]);
|
||||
}
|
||||
|
||||
// select someone by nick or attag in the current network
|
||||
// select someone by nick in the current network
|
||||
if (!DBA::isResult($contact) && ($network != '')) {
|
||||
$condition = ["(`nick` = ? OR `attag` = ?) AND `network` = ? AND `uid` = ?",
|
||||
$name, $name, $network, $profile_uid];
|
||||
$condition = ["`nick` = ? AND `network` = ? AND `uid` = ?",
|
||||
$name, $network, $profile_uid];
|
||||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||
}
|
||||
|
||||
// select someone by attag in the current network
|
||||
if (!DBA::isResult($contact) && ($network != '')) {
|
||||
$condition = ["`attag` = ? AND `network` = ? AND `uid` = ?",
|
||||
$name, $network, $profile_uid];
|
||||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||
}
|
||||
|
||||
|
@ -181,9 +188,15 @@ class Item
|
|||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||
}
|
||||
|
||||
// select someone by nick or attag in any network
|
||||
// select someone by nick in any network
|
||||
if (!DBA::isResult($contact)) {
|
||||
$condition = ["(`nick` = ? OR `attag` = ?) AND `uid` = ?", $name, $name, $profile_uid];
|
||||
$condition = ["`nick` = ? AND `uid` = ?", $name, $profile_uid];
|
||||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||
}
|
||||
|
||||
// select someone by attag in any network
|
||||
if (!DBA::isResult($contact)) {
|
||||
$condition = ["`attag` = ? AND `uid` = ?", $name, $profile_uid];
|
||||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue