]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
The curl result is an object, not an array
[friendica.git] / mod / common.php
index 8fb19b57cdbac15675121b57c3a4b93879f836c8..c88d6ee77c2594aa57ed1707b30fc26160652a06 100644 (file)
@@ -7,11 +7,12 @@ use Friendica\App;
 use Friendica\Content\ContactSelector;
 use Friendica\Content\Pager;
 use Friendica\Core\L10n;
+use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 use Friendica\Model;
 use Friendica\Module;
 use Friendica\Util\Proxy as ProxyUtils;
-
+use Friendica\Util\Strings;
 
 require_once 'include/dba.php';
 
@@ -48,13 +49,13 @@ function common_content(App $a)
                $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
 
                if (DBA::isResult($contact)) {
-                       $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
+                       $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate("vcard-widget.tpl"), [
                                '$name'  => htmlentities($contact['name']),
                                '$photo' => $contact['photo'],
                                'url'    => 'contact/' . $cid
                        ]);
 
-                       if (!x($a->page, 'aside')) {
+                       if (empty($a->page['aside'])) {
                                $a->page['aside'] = '';
                        }
                        $a->page['aside'] .= $vcard_widget;
@@ -66,11 +67,11 @@ function common_content(App $a)
        }
 
        if (!$cid && Model\Profile::getMyURL()) {
-               $contact = DBA::selectFirst('contact', ['id'], ['nurl' => normalise_link(Model\Profile::getMyURL()), 'uid' => $uid]);
+               $contact = DBA::selectFirst('contact', ['id'], ['nurl' => Strings::normaliseLink(Model\Profile::getMyURL()), 'uid' => $uid]);
                if (DBA::isResult($contact)) {
                        $cid = $contact['id'];
                } else {
-                       $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => normalise_link(Model\Profile::getMyURL())]);
+                       $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(Model\Profile::getMyURL())]);
                        if (DBA::isResult($gcontact)) {
                                $zcid = $gcontact['id'];
                        }
@@ -142,9 +143,9 @@ function common_content(App $a)
                $title = L10n::t('Common Friends');
        }
 
-       $tpl = get_markup_template('viewcontact_template.tpl');
+       $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
 
-       $o .= replace_macros($tpl, [
+       $o .= Renderer::replaceMacros($tpl, [
                '$title'    => $title,
                '$tab_str'  => $tab_str,
                '$contacts' => $entries,