X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=15a5b2f40170d6fc76b8bb3e99849a6095daed0a;hb=4d39164c1ee6de2b1a09c2a1a8a4c89531d47ee5;hp=1292d24e3359ca9f401cae2853178ede9094e96e;hpb=4724c7de72cd7bf40af52f0ca07fdf8313b922f4;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index 1292d24e33..15a5b2f401 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -9,7 +9,8 @@ use Friendica\Core\System; use Friendica\Model\Contact; use Friendica\Model\Profile; use Friendica\Network\Probe; -use Friendica\Database\DBM; +use Friendica\Database\DBA; +use Friendica\Util\Proxy as ProxyUtils; function follow_post(App $a) { @@ -19,7 +20,7 @@ function follow_post(App $a) // NOTREACHED } - if ($_REQUEST['cancel']) { + if (isset($_REQUEST['cancel'])) { goaway($_SESSION['return_url']); } @@ -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) && !DBM::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')]], @@ -166,10 +167,13 @@ function follow_content(App $a) '$url_label' => L10n::t('Profile URL'), '$myaddr' => $myaddr, '$request' => $request, - /*'$location' => Friendica\Content\Text\BBCode::::convert($r[0]['location']), + /* + * @TODO commented out? + '$location' => Friendica\Content\Text\BBCode::::convert($r[0]['location']), '$location_label'=> L10n::t('Location:'), '$about' => Friendica\Content\Text\BBCode::::convert($r[0]['about'], false, false), - '$about_label' => L10n::t('About:'),*/ + '$about_label' => L10n::t('About:'), + */ '$keywords' => $r[0]['keywords'], '$keywords_label'=> L10n::t('Tags:') ]);