mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 16:44:26 +02:00
Merge pull request #8752 from annando/posts-from-id
Avoid unneeded database calls when showing posts of contacts
This commit is contained in:
commit
5f18d27b0b
2 changed files with 26 additions and 5 deletions
|
@ -976,7 +976,12 @@ class Contact extends BaseModule
|
|||
$profiledata = Model\Contact::getDetailsByURL($contact['url']);
|
||||
|
||||
Model\Profile::load($a, '', $profiledata, true);
|
||||
$o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
|
||||
|
||||
if ($contact['uid'] == 0) {
|
||||
$o .= Model\Contact::getPostsFromId($contact['id'], true, $update);
|
||||
} else {
|
||||
$o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
|
||||
}
|
||||
}
|
||||
|
||||
return $o;
|
||||
|
@ -998,7 +1003,12 @@ class Contact extends BaseModule
|
|||
}
|
||||
|
||||
Model\Profile::load($a, '', $profiledata, true);
|
||||
$o .= Model\Contact::getPostsFromUrl($contact['url']);
|
||||
|
||||
if ($contact['uid'] == 0) {
|
||||
$o .= Model\Contact::getPostsFromId($contact['id']);
|
||||
} else {
|
||||
$o .= Model\Contact::getPostsFromUrl($contact['url']);
|
||||
}
|
||||
}
|
||||
|
||||
return $o;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue