mirror of
https://github.com/friendica/friendica
synced 2025-04-29 02:24:22 +02:00
Use "failed" field
This commit is contained in:
parent
ebcf757244
commit
5bf813d0ec
9 changed files with 22 additions and 24 deletions
|
@ -58,12 +58,11 @@ class SearchDirectory
|
|||
if (!empty($j->results)) {
|
||||
foreach ($j->results as $jj) {
|
||||
// Check if the contact already exists
|
||||
$gcontact = DBA::selectFirst('gcontact', ['id', 'last_contact', 'last_failure', 'updated'], ['nurl' => Strings::normaliseLink($jj->url)]);
|
||||
$gcontact = DBA::selectFirst('gcontact', ['failed'], ['nurl' => Strings::normaliseLink($jj->url)]);
|
||||
if (DBA::isResult($gcontact)) {
|
||||
Logger::info('Profile already exists', ['profile' => $jj->url, 'search' => $search]);
|
||||
|
||||
if (($gcontact['last_contact'] < $gcontact['last_failure']) &&
|
||||
($gcontact['updated'] < $gcontact['last_failure'])) {
|
||||
if ($gcontact['failed']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue