mirror of
https://github.com/friendica/friendica
synced 2025-04-27 00:30:10 +00:00
Several speed improvements (magiclink, caching, indexes)
This commit is contained in:
parent
251465f67a
commit
312c01a517
21 changed files with 119 additions and 86 deletions
|
@ -518,7 +518,7 @@ class Contact extends BaseModule
|
|||
|
||||
$relation_text = sprintf($relation_text, $contact['name']);
|
||||
|
||||
$url = Model\Contact::magicLink($contact['url']);
|
||||
$url = Model\Contact::magicLinkByContact($contact);
|
||||
if (strpos($url, 'redir/') === 0) {
|
||||
$sparkle = ' class="sparkle" ';
|
||||
} else {
|
||||
|
@ -1076,7 +1076,7 @@ class Contact extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
$url = Model\Contact::magicLink($contact['url']);
|
||||
$url = Model\Contact::magicLinkByContact($contact);
|
||||
|
||||
if (strpos($url, 'redir/') === 0) {
|
||||
$sparkle = ' class="sparkle" ';
|
||||
|
|
|
@ -94,7 +94,7 @@ class Hovercard extends BaseModule
|
|||
'nick' => $contact['nick'],
|
||||
'addr' => $contact['addr'] ?: $contact['url'],
|
||||
'thumb' => Contact::getThumb($contact),
|
||||
'url' => Contact::magicLink($contact['url']),
|
||||
'url' => Contact::magicLinkByContact($contact),
|
||||
'nurl' => $contact['nurl'],
|
||||
'location' => $contact['location'],
|
||||
'about' => $contact['about'],
|
||||
|
|
|
@ -47,7 +47,7 @@ class ItemBody extends BaseModule
|
|||
throw new HTTPException\NotFoundException(DI::l10n()->t('Item not found.'));
|
||||
}
|
||||
|
||||
$item = Post::selectFirst(['body'], ['uid' => local_user(), 'id' => $itemId]);
|
||||
$item = Post::selectFirst(['body'], ['uid' => local_user(), 'uri-id' => $itemId]);
|
||||
|
||||
if (!empty($item)) {
|
||||
if (DI::mode()->isAjax()) {
|
||||
|
|
|
@ -34,10 +34,10 @@ class RandomProfile extends BaseModule
|
|||
{
|
||||
$a = DI::app();
|
||||
|
||||
$contactUrl = Contact::getRandomUrl();
|
||||
$contact = Contact::getRandomContact();
|
||||
|
||||
if ($contactUrl) {
|
||||
$link = Contact::magicLink($contactUrl);
|
||||
if (!empty($contact)) {
|
||||
$link = Contact::magicLinkByContact($contact);
|
||||
$a->redirect($link);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue