X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Funfollow.php;h=2f9264088696e4157811975634057d368f88da7c;hb=865006682a3952565035207898b80dfbd6d390b1;hp=aca17727b6950627791cd742daad45352f592047;hpb=48a783c91a4fdff2182deb5d137712386f9f3086;p=friendica.git diff --git a/mod/unfollow.php b/mod/unfollow.php index aca17727b6..2f92640886 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -20,12 +20,12 @@ */ use Friendica\App; +use Friendica\Content\Widget; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Profile; use Friendica\Model\User; use Friendica\Util\Strings; @@ -84,9 +84,6 @@ function unfollow_content(App $a) // NOTREACHED } - // Makes the connection request for friendica contacts easier - $_SESSION['fastlane'] = $contact['url']; - if (!empty($_REQUEST['auto'])) { unfollow_process($contact['url']); } @@ -107,8 +104,7 @@ function unfollow_content(App $a) '$keywords_label'=> '' ]); - DI::page()['aside'] = ''; - Profile::load($a, '', Contact::getByURL($contact['url'], 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')]); @@ -148,12 +144,12 @@ function unfollow_process(string $url) Contact::terminateFriendship($owner, $contact, $dissolve); } - // Sharing-only contacts get deleted as there no relationship any more + // Sharing-only contacts get deleted as there no relationship anymore if ($dissolve) { Contact::remove($contact['id']); $return_path = $base_return_path; } else { - DBA::update('contact', ['rel' => Contact::FOLLOWER], ['id' => $contact['id']]); + Contact::update(['rel' => Contact::FOLLOWER], ['id' => $contact['id']]); $return_path = $base_return_path . '/' . $contact['id']; }