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';
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') {
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']));
}
}
}