X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fallfriends.php;h=ce648cc25a4844f7e428b918379c005937d06041;hb=41663c7592abe55a958632c3a48265e0a8544d2b;hp=83ea73af6b97222890bbd3395fa79a99cbff9070;hpb=dbfe5c9d2a7173292db9c053feb99ffcd0182000;p=friendica.git diff --git a/mod/allfriends.php b/mod/allfriends.php index 83ea73af6b..ce648cc25a 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -7,6 +7,7 @@ use Friendica\App; use Friendica\Content\ContactSelector; use Friendica\Content\Pager; use Friendica\Core\L10n; +use Friendica\Core\Renderer; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Model; @@ -14,8 +15,6 @@ use Friendica\Module; use Friendica\Util\Proxy as ProxyUtils; -require_once 'include/dba.php'; - function allfriends_content(App $a) { $o = ''; @@ -61,8 +60,6 @@ function allfriends_content(App $a) //get further details of the contact $contact_details = Model\Contact::getDetailsByURL($rr['url'], $uid, $rr); - $photo_menu = ''; - $connlnk = ''; // $rr[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photo_menu // If the contact is not common to the user, Connect/Follow' will be added to the photo menu @@ -78,11 +75,11 @@ function allfriends_content(App $a) } $entry = [ - 'url' => $rr['url'], + 'url' => Model\Contact::magicLink($rr['url']), 'itemurl' => defaults($contact_details, 'addr', $rr['url']), - 'name' => htmlentities($contact_details['name']), + 'name' => $contact_details['name'], 'thumb' => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB), - 'img_hover' => htmlentities($contact_details['name']), + 'img_hover' => $contact_details['name'], 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], @@ -98,10 +95,8 @@ function allfriends_content(App $a) $tab_str = Module\Contact::getTabsHTML($a, $contact, 4); - $tpl = get_markup_template('viewcontact_template.tpl'); - - $o .= replace_macros($tpl, [ - //'$title' => L10n::t('Friends of %s', htmlentities($c[0]['name'])), + $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); + $o .= Renderer::replaceMacros($tpl, [ '$tab_str' => $tab_str, '$contacts' => $entries, '$paginate' => $pager->renderFull($total),