intval($contact['id'])
);
mark_for_death($contact);
- }
- else {
- if ($contact['term-date'] > NULL_DATE) {
- logger("poller: $url back from the dead - removing mark for death");
- unmark_for_death($contact);
- }
- } elseif ($contact['term-date'] != '0000-00-00 00:00:00') {
++ } elseif ($contact['term-date'] > NULL_DATE) {
+ logger("poller: $url back from the dead - removing mark for death");
+ unmark_for_death($contact);
}
- if((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id)))
+ if ((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) {
return;
+ }
- if(((float) $res->dfrn_version > 2.21) && ($contact['poco'] == '')) {
+ if (((float) $res->dfrn_version > 2.21) && ($contact['poco'] == '')) {
q("update contact set poco = '%s' where id = %d",
dbesc(str_replace('/profile/','/poco/', $contact['url'])),
intval($contact['id'])
return false;
$servers = q("SELECT * FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url)));
- if ($servers) {
+ if (dbm::is_result($servers)) {
- if ($servers[0]["created"] == "0000-00-00 00:00:00")
+ if ($servers[0]["created"] <= NULL_DATE)
q("UPDATE `gserver` SET `created` = '%s' WHERE `nurl` = '%s'",
dbesc(datetime_convert()), dbesc(normalise_link($server_url)));