Remove references to dfrn_request

This commit is contained in:
Hypolite Petovan 2022-05-07 16:01:11 -04:00
parent 2627b54349
commit a5700cb2c9
3 changed files with 1 additions and 12 deletions

View file

@ -44,7 +44,6 @@ Example:
"region": "New York",
"country": "USA",
"profile_url": "https://friendica.mrpetovan.com/profile/hypolite",
"dfrn_request": "https://friendica.mrpetovan.com/dfrn_request/hypolite",
"photo": "https://friendica.mrpetovan.com/photo/27330388315ae4ed2b03e3c116980490-4.jpg?ts=1541567135",
"tags": "videogame gaming boardgame politics philosophy development programming php",
"last_activity": "2018-45",

View file

@ -86,7 +86,7 @@ class Profile extends \Friendica\Directory\Model
]);
$stmt = 'SELECT p.`id`, p.`name`, p.`username`, p.`addr`, p.`account_type`, p.`language`,
p.`pdesc`, p.`locality`, p.`region`, p.`country`, p.`profile_url`, p.`dfrn_request`,
p.`pdesc`, p.`locality`, p.`region`, p.`country`, p.`profile_url`,
p.`photo`, p.`tags`, p.`last_activity`, s.`version`
FROM `profile` p
JOIN `server` s ON s.`id` = p.`server_id` AND s.`available` AND NOT s.`hidden`

View file

@ -9,7 +9,6 @@ use Friendica\Directory\Utils\Network;
*/
class Profile
{
const PROFILE_MISSING_REQUEST = 1;
const PROFILE_MISSING_CONFIRM = 2;
const PROFILE_MISSING_NOTIFY = 4;
const PROFILE_MISSING_POLL = 8;
@ -177,9 +176,6 @@ class Profile
// This is most likely a problem with the site configuration. Ignore.
if ($error = self::validateParams($params)) {
$this->logger->warning('Poll aborted, parameters invalid.', ['params' => $params]);
if ($error & Profile::PROFILE_MISSING_REQUEST) {
$this->logger->notice('dfrn-request parameter is empty.');
}
if ($error & Profile::PROFILE_MISSING_CONFIRM) {
$this->logger->notice('dfrn-confirm parameter is empty.');
}
@ -232,7 +228,6 @@ class Profile
'region' => $params['region'] ?? '',
'country' => $params['country-name'] ?? '',
'profile_url' => $profile_uri,
'dfrn_request' => $params['dfrn-request'] ?? null,
'photo' => $params['photo'],
'tags' => implode(' ', $tags),
'addr' => $addr,
@ -254,7 +249,6 @@ class Profile
`region` = :region,
`country` = :country,
`profile_url` = :profile_url,
`dfrn_request` = :dfrn_request,
`photo` = :photo,
`tags` = :tags,
`addr` = :addr,
@ -274,7 +268,6 @@ class Profile
`region` = :region,
`country` = :country,
`profile_url` = :profile_url,
`dfrn_request` = :dfrn_request,
`photo` = :photo,
`tags` = :tags,
`addr` = :addr,
@ -361,9 +354,6 @@ class Profile
private static function validateParams(array $params): int
{
$errors = 0;
if (empty($params['dfrn-request'])) {
$errors &= self::PROFILE_MISSING_REQUEST;
}
if (empty($params['dfrn-confirm'])) {
$errors &= self::PROFILE_MISSING_CONFIRM;
}