X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcronjobs.php;h=437fedd53c2243da5d68521d36c1a02fe979f9b5;hb=26d7cf1d6a03840bd6645ceb514ee92620a65485;hp=ee1ac517acbe91d3038bdbbc3716c0e4efd545aa;hpb=fa3fa42d966e00534aa6cbf33d60ef438a8e3b97;p=friendica.git diff --git a/include/cronjobs.php b/include/cronjobs.php index ee1ac517ac..437fedd53c 100644 --- a/include/cronjobs.php +++ b/include/cronjobs.php @@ -2,18 +2,17 @@ use Friendica\App; use Friendica\Core\Config; +use Friendica\Network\Probe; function cronjobs_run(&$argv, &$argc){ global $a; - 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'); - require_once('include/user.php'); - require_once('include/socgraph.php'); - require_once('include/Probe.php'); + require_once 'include/datetime.php'; + require_once 'include/post_update.php'; + require_once 'mod/nodeinfo.php'; + require_once 'include/photos.php'; + require_once 'include/user.php'; + require_once 'include/socgraph.php'; // No parameter set? So return if ($argc <= 1) { @@ -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'])); } } }