X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fcronjobs.php;h=437fedd53c2243da5d68521d36c1a02fe979f9b5;hb=26d7cf1d6a03840bd6645ceb514ee92620a65485;hp=4c41f182fed2c530044e57f089690bf2f46babea;hpb=be9db7f0604f77396c2c4ff0489b20036abf177c;p=friendica.git diff --git a/include/cronjobs.php b/include/cronjobs.php index 4c41f182fe..437fedd53c 100644 --- a/include/cronjobs.php +++ b/include/cronjobs.php @@ -1,16 +1,18 @@ '%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 +221,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; }