]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
Fix fatal error because of unknown function "fetchUrl"
[friendica.git] / mod / common.php
index 436d8bb559b485305d1b89c6d4820b09d6de37fb..0ff523b3f77c0d0f38b8ba9d3ce5c960a597908e 100644 (file)
@@ -40,7 +40,7 @@ function common_content(App $a)
        $zcid = 0;
 
        if (!local_user()) {
-               notice(DI::l10n()->t('Permission denied.') . EOL);
+               notice(DI::l10n()->t('Permission denied.'));
                return;
        }
 
@@ -57,13 +57,13 @@ function common_content(App $a)
 
                if (DBA::isResult($contact)) {
                        DI::page()['aside'] = "";
-                       Model\Profile::load($a, "", Model\Contact::getDetailsByURL($contact["url"]));
+                       Model\Profile::load($a, "", Model\Contact::getByURL($contact["url"], false));
                }
        } else {
                $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
 
                if (DBA::isResult($contact)) {
-                       $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate("widget/vcard.tpl"), [
+                       $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [
                                '$name'  => $contact['name'],
                                '$photo' => $contact['photo'],
                                'url'    => 'contact/' . $cid
@@ -103,11 +103,11 @@ function common_content(App $a)
        }
 
        if ($total < 1) {
-               notice(DI::l10n()->t('No contacts in common.') . EOL);
+               notice(DI::l10n()->t('No contacts in common.'));
                return $o;
        }
 
-       $pager = new Pager(DI::args()->getQueryString());
+       $pager = new Pager(DI::l10n(), DI::args()->getQueryString());
 
        if ($cid) {
                $common_friends = Model\GContact::commonFriends($uid, $cid, $pager->getStart(), $pager->getItemsPerPage());
@@ -124,7 +124,7 @@ function common_content(App $a)
        $entries = [];
        foreach ($common_friends as $common_friend) {
                //get further details of the contact
-               $contact_details = Model\Contact::getDetailsByURL($common_friend['url'], $uid);
+               $contact_details = Model\Contact::getByURLForUser($common_friend['url'], $uid);
 
                // $rr['id'] is needed to use contact_photo_menu()
                /// @TODO Adding '/" here avoids E_NOTICE on missing constants