X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcronjobs.php;h=53316e464f7c591141361ce29047fac075229459;hb=eb7cbb9adafa003a06f2e2d2df70b4f1a46b1a85;hp=4c41f182fed2c530044e57f089690bf2f46babea;hpb=be9db7f0604f77396c2c4ff0489b20036abf177c;p=friendica.git diff --git a/include/cronjobs.php b/include/cronjobs.php index 4c41f182fe..53316e464f 100644 --- a/include/cronjobs.php +++ b/include/cronjobs.php @@ -1,16 +1,19 @@ '%s' AND `account_expires_on` < UTC_TIMESTAMP()", dbesc(NULL_DATE)); - // delete user and contact records for recently removed accounts + // delete user records for recently removed accounts $r = q("SELECT * FROM `user` WHERE `account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY"); if (dbm::is_result($r)) { - foreach($r as $user) { - q("DELETE FROM `contact` WHERE `uid` = %d", intval($user['uid'])); - q("DELETE FROM `user` WHERE `uid` = %d", intval($user['uid'])); + foreach ($r as $user) { + dba::delete('user', array('uid' => $user['uid'])); } } } @@ -233,17 +235,11 @@ function cron_repair_diaspora(App $a) { return; } - $server_url = poco_detect_server($contact["url"]); - - if (($server_url != "") AND !poco_check_server($server_url)) { - continue; - } - if (!poco_reachable($contact["url"])) { continue; } - $data = probe_url($contact["url"]); + $data = Probe::uri($contact["url"]); if ($data["network"] != NETWORK_DIASPORA) { continue; }