Simplified functionality to load the profile in the sidebar

This commit is contained in:
Michael
2021-07-23 12:39:37 +00:00
parent fe8e71216d
commit afe3c8954c
15 changed files with 195 additions and 138 deletions

View File

@@ -20,6 +20,7 @@
*/
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\DI;
@@ -75,7 +76,7 @@ function follow_content(App $a)
// Don't try to add a pending contact
$user_contact = DBA::selectFirst('contact', ['pending'], ["`uid` = ? AND ((`rel` != ?) OR (`network` = ?)) AND
(`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
(`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
$uid, Contact::FOLLOWER, Protocol::DFRN, Strings::normaliseLink($url),
Strings::normaliseLink($url), $url, Protocol::STATUSNET]);
@@ -157,7 +158,7 @@ function follow_content(App $a)
DI::page()['aside'] = '';
if ($protocol != Protocol::PHANTOM) {
Profile::load($a, '', $contact, false);
DI::page()['aside'] = Widget\VCard::getHTML(Contact::getByURL($contact['url'], false));
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'),
['$title' => DI::l10n()->t('Status Messages and Posts')]