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

@ -22,6 +22,7 @@
namespace Friendica\Module\Contact;
use Friendica\BaseModule;
use Friendica\Content\Widget;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
@ -104,7 +105,7 @@ class Advanced extends BaseModule
throw new BadRequestException(DI::l10n()->t('Contact not found.'));
}
Model\Profile::load(DI::app(), "", Model\Contact::getByURL($contact["url"], false));
DI::page()['aside'] = Widget\VCard::getHTML($contact);
$warning = DI::l10n()->t('<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working.');
$info = DI::l10n()->t('Please use your browser \'Back\' button <strong>now</strong> if you are uncertain what to do on this page.');

View file

@ -38,7 +38,7 @@ class Contacts extends BaseModule
$localContactId = Model\Contact::getPublicIdByUserId(local_user());
Model\Profile::load($app, '', $contact);
DI::page()['aside'] = Widget\VCard::getHTML($contact);
$condition = [
'blocked' => false,

View file

@ -3,6 +3,7 @@
namespace Friendica\Module\Contact;
use Friendica\BaseModule;
use Friendica\Content\Widget;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -135,7 +136,7 @@ class Poke extends BaseModule
throw new HTTPException\NotFoundException();
}
Model\Profile::load(DI::app(), '', Model\Contact::getByURL($contact["url"], false));
DI::page()['aside'] = Widget\VCard::getHTML(Model\Contact::getByURL($contact["url"], false));
$verbs = [];
foreach (DI::l10n()->getPokeVerbs() as $verb => $translations) {