X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcronjobs.php;h=437fedd53c2243da5d68521d36c1a02fe979f9b5;hb=5498f04ffa88197f49e1f37b814d6954f8785fb7;hp=a2fc99825176fa95695d536d50ae280254a86c6f;hpb=82b423c5ac3269d39e6384fa3c43d1d9e5285ad4;p=friendica.git diff --git a/include/cronjobs.php b/include/cronjobs.php index a2fc998251..437fedd53c 100644 --- a/include/cronjobs.php +++ b/include/cronjobs.php @@ -2,13 +2,12 @@ use Friendica\App; use Friendica\Core\Config; +use Friendica\Network\Probe; function cronjobs_run(&$argv, &$argc){ global $a; - require_once('include/Probe.php'); require_once 'include/datetime.php'; - require_once 'include/ostatus.php'; require_once 'include/post_update.php'; require_once 'mod/nodeinfo.php'; require_once 'include/photos.php'; @@ -22,19 +21,6 @@ function cronjobs_run(&$argv, &$argc){ logger("Starting cronjob ".$argv[1], LOGGER_DEBUG); - // Check OStatus conversations - // Check only conversations with mentions (for a longer time) - if ($argv[1] == 'ostatus_mentions') { - ostatus::check_conversations(true); - return; - } - - // Check every conversation - if ($argv[1] == 'ostatus_conversations') { - ostatus::check_conversations(false); - return; - } - // Call possible post update functions // see include/post_update.php for more details if ($argv[1] == 'post_update') { @@ -110,12 +96,11 @@ function cron_expire_and_remove_users() { AND `account_expires_on` > '%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'])); + dba::delete('user', array('uid' => $user['uid'])); } } }