]> git.mxchange.org Git - friendica.git/blobdiff - mod/viewcontacts.php
Merge pull request #6225 from annando/http-error
[friendica.git] / mod / viewcontacts.php
index 9a2513a6c400f667878448a55f7414d4629c7963..8b7acffbdc90fdd597a8680862101430eea1dad0 100644 (file)
@@ -10,6 +10,7 @@ use Friendica\Content\Pager;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\Protocol;
+use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
@@ -67,8 +68,9 @@ function viewcontacts_content(App $a)
        $r = q("SELECT COUNT(*) AS `total` FROM `contact`
                WHERE `uid` = %d AND NOT `blocked` AND NOT `pending`
                        AND NOT `hidden` AND NOT `archive`
-                       AND `network` IN ('%s', '%s', '%s')",
+                       AND `network` IN ('%s', '%s', '%s', '%s')",
                intval($a->profile['uid']),
+               DBA::escape(Protocol::ACTIVITYPUB),
                DBA::escape(Protocol::DFRN),
                DBA::escape(Protocol::DIASPORA),
                DBA::escape(Protocol::OSTATUS)
@@ -81,9 +83,10 @@ function viewcontacts_content(App $a)
        $r = q("SELECT * FROM `contact`
                WHERE `uid` = %d AND NOT `blocked` AND NOT `pending`
                        AND NOT `hidden` AND NOT `archive`
-                       AND `network` IN ('%s', '%s', '%s')
+                       AND `network` IN ('%s', '%s', '%s', '%s')
                ORDER BY `name` ASC LIMIT %d, %d",
                intval($a->profile['uid']),
+               DBA::escape(Protocol::ACTIVITYPUB),
                DBA::escape(Protocol::DFRN),
                DBA::escape(Protocol::DIASPORA),
                DBA::escape(Protocol::OSTATUS),
@@ -124,8 +127,8 @@ function viewcontacts_content(App $a)
        }
 
 
-       $tpl = get_markup_template("viewcontact_template.tpl");
-       $o .= replace_macros($tpl, [
+       $tpl = Renderer::getMarkupTemplate("viewcontact_template.tpl");
+       $o .= Renderer::replaceMacros($tpl, [
                '$title' => L10n::t('Contacts'),
                '$contacts' => $contacts,
                '$paginate' => $pager->renderFull($total),