]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
[WIP] Rewrite to Proxy class: (#5507)
[friendica.git] / mod / follow.php
index 3a391ea33c20e5e2c186c79dc1a5bdf55d033cc2..15a5b2f40170d6fc76b8bb3e99849a6095daed0a 100644 (file)
@@ -10,6 +10,7 @@ use Friendica\Model\Contact;
 use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 use Friendica\Database\DBA;
+use Friendica\Util\Proxy as ProxyUtils;
 
 function follow_post(App $a)
 {
@@ -65,8 +66,8 @@ function follow_content(App $a)
        $r = q("SELECT `pending` FROM `contact` WHERE `uid` = %d AND ((`rel` != %d) OR (`network` = '%s')) AND
                (`nurl` = '%s' OR `alias` = '%s' OR `alias` = '%s') AND
                `network` != '%s' LIMIT 1",
-               intval(local_user()), dbesc(CONTACT_IS_FOLLOWER), dbesc(NETWORK_DFRN), dbesc(normalise_link($url)),
-               dbesc(normalise_link($url)), dbesc($url), dbesc(NETWORK_STATUSNET));
+               intval(local_user()), DBA::escape(Contact::FOLLOWER), DBA::escape(NETWORK_DFRN), DBA::escape(normalise_link($url)),
+               DBA::escape(normalise_link($url)), DBA::escape($url), DBA::escape(NETWORK_STATUSNET));
 
        if ($r) {
                if ($r[0]['pending']) {
@@ -104,7 +105,7 @@ function follow_content(App $a)
                $ret['url'] = $ret['addr'];
        }
 
-       if (($ret['network'] === NETWORK_DFRN) && !DBA::is_result($r)) {
+       if (($ret['network'] === NETWORK_DFRN) && !DBA::isResult($r)) {
                $request = $ret['request'];
                $tpl = get_markup_template('dfrn_request.tpl');
        } else {
@@ -144,7 +145,7 @@ function follow_content(App $a)
 
        $o = replace_macros($tpl, [
                '$header'        => htmlentities($header),
-               //'$photo' => proxy_url($ret['photo'], false, PROXY_SIZE_SMALL),
+               //'$photo'         => ProxyUtils::proxifyUrl($ret['photo'], false, ProxyUtils::SIZE_SMALL),
                '$desc'          => '',
                '$pls_answer'    => L10n::t('Please answer the following:'),
                '$does_know_you' => ['knowyou', L10n::t('Does %s know you?', $ret['name']), false, '', [L10n::t('No'), L10n::t('Yes')]],