Remove validity check on profile key parameter

This commit is contained in:
Hypolite Petovan 2020-09-26 16:33:29 -04:00
parent ffa16d1935
commit c8fa6ef3dc
2 changed files with 1 additions and 8 deletions

View File

@ -333,9 +333,6 @@ class Profile
private static function validateParams(array $params): int
{
$errors = 0;
if (empty($params['key'])) {
$errors++;
}
if (empty($params['dfrn-request'])) {
$errors++;
}

View File

@ -129,7 +129,7 @@ class Scrape
$nodes_left = max(intval($max_nodes), $minNodes);
$items = $dom->getElementsByTagName('*');
$targets = array('fn', 'pdesc', 'photo', 'key', 'locality', 'region', 'postal-code', 'country-name');
$targets = array('fn', 'pdesc', 'photo', 'locality', 'region', 'postal-code', 'country-name');
$targets_left = count($targets);
foreach ($items as $item) {
if (self::attributeContains($item->getAttribute('class'), 'vcard')) {
@ -147,10 +147,6 @@ class Scrape
$params['photo'] = $vcard_element->getAttribute('src');
$targets_left = self::popScrapeTarget($targets, 'photo');
}
if (self::attributeContains($vcard_element->getAttribute('class'), 'key')) {
$params['key'] = $vcard_element->textContent;
$targets_left = self::popScrapeTarget($targets, 'key');
}
if (self::attributeContains($vcard_element->getAttribute('class'), 'locality')) {
$params['locality'] = $vcard_element->textContent;
$targets_left = self::popScrapeTarget($targets, 'locality');